diff options
| author | Paul Buetow <paul@buetow.org> | 2022-06-15 08:54:26 +0100 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2022-06-15 08:54:26 +0100 |
| commit | e4676049f25c5fa0cb645d1555934fda88029fd5 (patch) | |
| tree | 53bdd9694d755e56dbc375c6459adf104bbf5036 | |
| parent | 03a55d2eeaa2da52f071571942082edeba6613dc (diff) | |
sweating the small stuff
36 files changed, 724 insertions, 470 deletions
diff --git a/gemfeed/2008-06-26-perl-poetry.html b/gemfeed/2008-06-26-perl-poetry.html index 996ffcb9..b78c4351 100644 --- a/gemfeed/2008-06-26-perl-poetry.html +++ b/gemfeed/2008-06-26-perl-poetry.html @@ -30,7 +30,7 @@ _~~|~/_|_|__/|~~~~~~~ | / ~~~~~ | | ~~~~~~~~ || \\ _/ / | | ~ ~ ~~~ _|| (_/ (___)_| |Nov291999 (__) (____) -</pre> +</pre><br /> <p class="quote"><i>Published by Paul at 2008-06-26, last updated at 2021-05-04</i></p> <p>Here are some Perl Poems I wrote. They don't do anything useful when you run them, but they don't produce a compiler error either. They only exist for fun and demonstrate what you can do with Perl syntax.</p> <p>Wikipedia: "Perl poetry is the practice of writing poems that can be compiled as legal Perl code, for example the piece known as Black Perl. Perl poetry is made possible by the large number of English words that are used in the Perl language. New poems are regularly submitted to the community at PerlMonks."</p> @@ -76,7 +76,7 @@ do { exp'onentize' and abs'olutize' }; home: //ig,'nore', time and sleep $very =~ s/tr/on/g; __END__ -</pre> +</pre><br /> <h2>christmas.pl</h2> <pre> #!/usr/bin/perl @@ -120,7 +120,7 @@ END {} our $mission and do sleep until next Christmas ;} __END__ This is perl, v5.8.8 built for i386-freebsd-64int -</pre> +</pre><br /> <h2>shopping.pl</h2> <pre> #!/usr/bin/perl @@ -152,7 +152,7 @@ and sleep until unpack$ing, cool products(); __END__ This is perl, v5.8.8 built for i386-freebsd-64int -</pre> +</pre><br /> <h2>More...</h2> <p>Did you like what you saw? Have a look at Codeberg to see my other poems too:</p> <a class="textlink" href="https://codeberg.org/snonux/perl-poetry">https://codeberg.org/snonux/perl-poetry</a><br /> diff --git a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.html b/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.html index d00106f1..cf7b033e 100644 --- a/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.html +++ b/gemfeed/2008-12-29-using-my-nokia-n95-for-fixing-my-mta.html @@ -24,7 +24,7 @@ \|/ \\|| \\| |// _jgs_\|//_\\|///_\V/_\|//__ Art by Joan Stark -</pre> +</pre><br /> <p class="quote"><i>Published by Paul at 2008-12-29, last updated at 2021-12-01</i></p> <p>The last week I was in Vidin, Bulgaria with no internet access and I had to fix my MTA (Postfix) at host.0.buetow.org which serves E-Mail for all my customers at P. B. Labs. Good, that I do not guarantee high availability on my web services (I've to do a full time job somewhere else too). </p> <p>My first attempt to find an internet café, which was working during Christmastime, failed. However, I found with my N95 phone lots of free WLAN hotspots. The hotspots refused me logging into my server using SSH as I have configured a non-standard port for SSH for security reasons. Without knowing the costs, I used the GPRS internet access of my German phone provider (yes, I had to pay roaming fees). </p> diff --git a/gemfeed/2010-04-09-standard-ml-and-haskell.html b/gemfeed/2010-04-09-standard-ml-and-haskell.html index c1e26db2..e99e71dd 100644 --- a/gemfeed/2010-04-09-standard-ml-and-haskell.html +++ b/gemfeed/2010-04-09-standard-ml-and-haskell.html @@ -20,7 +20,7 @@ datatype ’a multi = EMPTY | ELEM of ’a | UNION of ’a multi * ’a multi -</pre> +</pre><br /> <p>Haskell:</p> <pre> data (Eq a) => Multi a @@ -28,7 +28,7 @@ data (Eq a) => Multi a | Elem a | Union (Multi a) (Multi a) deriving Show -</pre> +</pre><br /> <h2>Processing a multi</h2> <p>Standard ML:</p> <pre> @@ -38,7 +38,7 @@ fun number (EMPTY) _ = 0 fun test_number w = number (UNION (EMPTY, \ UNION (ELEM 4, UNION (ELEM 6, \ UNION (UNION (ELEM 4, ELEM 4), EMPTY))))) w -</pre> +</pre><br /> <p>Haskell:</p> <pre> number Empty _ = 0 @@ -46,7 +46,7 @@ number (Elem x) w = if x == w then 1 else 0 test_number w = number (Union Empty \ (Union (Elem 4) (Union (Elem 6) \ (Union (Union (Elem 4) (Elem 4)) Empty)))) w -</pre> +</pre><br /> <h2>Simplify function</h2> <p>Standard ML:</p> <pre> @@ -63,7 +63,7 @@ fun simplify (UNION (x,y)) = else UNION (x’, y’) end | simplify x = x -</pre> +</pre><br /> <p>Haskell:</p> <pre> simplify (Union x y) @@ -77,7 +77,7 @@ simplify (Union x y) x’ = simplify x y’ = simplify y simplify x = x -</pre> +</pre><br /> <h2>Delete all</h2> <p>Standard ML:</p> <pre> @@ -87,7 +87,7 @@ fun delete_all m w = | delete_all’ x = x in simplify (delete_all’ m) end -</pre> +</pre><br /> <p>Haskell:</p> <pre> delete_all m w = simplify (delete_all’ m) @@ -95,7 +95,7 @@ delete_all m w = simplify (delete_all’ m) delete_all’ (Elem x) = if x == w then Empty else Elem x delete_all’ (Union x y) = Union (delete_all’ x) (delete_all’ y) delete_all’ x = x -</pre> +</pre><br /> <h2>Delete one</h2> <p>Standard ML:</p> <pre> @@ -114,7 +114,7 @@ fun delete_one m w = val (m’, _) = delete_one’ m in simplify m’ end -</pre> +</pre><br /> <p>Haskell:</p> <pre> delete_one m w = do @@ -130,7 +130,7 @@ delete_one m w = do delete_one’ (Elem x) = if x == w then (Empty, True) else (Elem x, False) delete_one’ x = (x, False) -</pre> +</pre><br /> <h2>Higher-order functions</h2> <p>The first line is always the SML code, the second line the Haskell variant:</p> <pre> @@ -145,7 +145,7 @@ my_map f l = foldr (make_map_fn f) [] l fun my_filter f l = foldr (make_filter_fn f) [] l my_filter f l = foldr (make_filter_fn f) [] l -</pre> +</pre><br /> <p>E-Mail me your comments to paul at buetow dot org!</p> <a class="textlink" href="../">Go back to the main site</a><br /> <p class="footer"> diff --git a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.html b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.html index 1179f6d8..489382d9 100644 --- a/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.html +++ b/gemfeed/2010-05-07-lazy-evaluation-with-standarn-ml.html @@ -20,7 +20,7 @@ ( |---- | | `---------------'--\\\\ .`--' -Glyde- `|||| -</pre> +</pre><br /> <p class="quote"><i>Published by Paul at 2010-05-07</i></p> <p>In contrast to Haskell, Standard SML does not use lazy evaluation by default but an eager evaluation. </p> <a class="textlink" href="https://en.wikipedia.org/wiki/Eager_evaluation">https://en.wikipedia.org/wiki/Eager_evaluation</a><br /> @@ -66,7 +66,7 @@ fun nat_pairs_not_null () = (* Test val test = first 10 (nat_pairs_not_null ()); *) -</pre> +</pre><br /> <a class="textlink" href="http://smlnj.org/">http://smlnj.org/</a><br /> <h2>Real laziness with Haskell </h2> <p>As Haskell already uses lazy evaluation by default, there is no need to construct a new data type. Lists in Haskell are lazy by default. You will notice that the code is also much shorter and easier to understand than the SML version. </p> @@ -90,7 +90,7 @@ nat_pairs_not_null = filters (\[x,y] -> x > 0 && y > 0) nat_pai {- Test: first 10 nat_pairs_not_null -} -</pre> +</pre><br /> <a class="textlink" href="http://www.haskell.org/">http://www.haskell.org/</a><br /> <p>E-Mail me your comments to paul at buetow dot org!</p> <a class="textlink" href="../">Go back to the main site</a><br /> diff --git a/gemfeed/2010-05-09-the-fype-programming-language.html b/gemfeed/2010-05-09-the-fype-programming-language.html index 7a8cf903..377ababa 100644 --- a/gemfeed/2010-05-09-the-fype-programming-language.html +++ b/gemfeed/2010-05-09-the-fype-programming-language.html @@ -16,7 +16,7 @@ _ / /| _| |_| | |_) | __/ | |_| | __/ (_| | | | |_| _| |_| | (_)_/ |_| \__, | .__/ \___| \__, |\___|\__,_|_| |_(_)_| \__, | |___/|_| |___/ |___/ -</pre> +</pre><br /> <p class="quote"><i>Published by Paul at 2010-05-09, last updated at 2021-05-05</i></p> <p>Fype is an interpreted programming language created by me for learning and fun. The interpreter is written in C. It has been tested on FreeBSD and NetBSD and may also work on other Unix like operating systems such as Linux based ones. Besides learning and fun, there is no other use case of why Fype exists as many other programming languages are much faster and more powerful.</p> <p>The Fype syntax is straightforward and uses a maximum look ahead of 1 and an effortless top-down parsing mechanism. Fype is parsing and interpreting its code simultaneously. This means that syntax errors are only detected during program runtime. </p> @@ -31,7 +31,7 @@ typedef struct { Hash *p_hash_syms; // Symbol table char *c_basename; } Fype; -</pre> +</pre><br /> <p>And here is a snippet from the primary Fype "class implementation":</p> <pre> Fype* @@ -81,7 +81,7 @@ fype_run(int i_argc, char **pc_argv) { return (0); } -</pre> +</pre><br /> <h2>Data types</h2> <p>Fype uses auto type conversion. However, if you want to know what's going on, you may take a look at the following basic data types:</p> <ul> @@ -109,7 +109,7 @@ say bar; my baz; say baz; # Will print out 0 -</pre> +</pre><br /> <p>You may use the "defined" keyword to check if an identifier has been defined or not:</p> <pre> ifnot defined foo { @@ -122,7 +122,7 @@ if defined foo { put "foo is defined and has the value "; say foo; } -</pre> +</pre><br /> <h3>Synonyms</h3> <p>Each variable can have as many synonyms as wished. A synonym is another name to access the content of a specific variable. Here is an example of how to use it:</p> <pre> @@ -132,7 +132,7 @@ foo = "bar"; # The synonym variable should now also set to "bar" assert "bar" == bar; -</pre> +</pre><br /> <p>Synonyms can be used for all kind of identifiers. It's not limited to standard variables but can also be used for function and procedure names (more about functions and procedures later).</p> <pre> # Create a new procedure baz @@ -145,7 +145,7 @@ undef baz; # bay still has a reference of the original procedure baz bay; # this prints aut "I am baz" -</pre> +</pre><br /> <p>The "syms" keyword gives you the total number of synonyms pointing to a specific value:</p> <pre> my foo = 1; @@ -157,14 +157,14 @@ say syms baz; # Prints 2 undef baz; say syms foo; # Prints 1 -</pre> +</pre><br /> <h2>Statements and expressions</h2> <p>A Fype program is a list of statements. Each keyword, expression or function call is part of a statement. Each statement is ended with a semicolon. Example:</p> <pre> my bar = 3, foo = 1 + 2; say foo; exit foo - bar; -</pre> +</pre><br /> <h3>Parenthesis</h3> <p>All parenthesis for function arguments is optional. They help to make the code better readable. They also help to force the precedence of expressions.</p> <h3>Basic expressions</h3> @@ -181,7 +181,7 @@ exit foo - bar; (integer) <any> <> <any> (integer) <any> gt <any> (integer) not <any> -</pre> +</pre><br /> <h3>Bitwise expressions</h3> <pre> (integer) <any> :< <any> @@ -189,41 +189,41 @@ exit foo - bar; (integer) <any> and <any> (integer) <any> or <any> (integer) <any> xor <any> -</pre> +</pre><br /> <h3>Numeric expressions</h3> <pre> (number) neg <number> -</pre> +</pre><br /> <p>... returns the negative value of "number":</p> <pre> (integer) no <integer> -</pre> +</pre><br /> <p>... returns 1 if the argument is 0; otherwise, it will return 0! If no argument is given, then 0 is returned!</p> <pre> (integer) yes <integer> -</pre> +</pre><br /> <p>... always returns 1. The parameter is optional. Example:</p> <pre> # Prints out 1, because foo is not defined if yes { say no defined foo; } -</pre> +</pre><br /> <h2>Control statements</h2> <p>Control statements available in Fype:</p> <pre> if <expression> { <statements> } -</pre> +</pre><br /> <p>... runs the statements if the expression evaluates to a true value.</p> <pre> ifnot <expression> { <statements> } -</pre> +</pre><br /> <p>... runs the statements if the expression evaluates to a false value.</p> <pre> while <expression> { <statements> } -</pre> +</pre><br /> <p>... runs the statements as long as the expression evaluates to a true value.</p> <pre> until <expression> { <statements> } -</pre> +</pre><br /> <p>... runs the statements as long as the expression evaluates to a false value.</p> <h2>Scopes</h2> <p>A new scope starts with an { and ends with an }. An exception is a procedure, which does not use its own scope (see later in this manual). Control statements and functions support scopes. The "scope" function prints out all available symbols at the current scope. Here is a small example:</p> @@ -252,7 +252,7 @@ my foo = 1; # Prints out 0 say defined bar; -</pre> +</pre><br /> <p>Another example including an actual output:</p> <pre> ./fype -e ’my global; func foo { my var4; func bar { my var2, var3; func baz { my var1; scope; } baz; } bar; } foo;’ @@ -270,29 +270,29 @@ SYM_FUNCTION: baz 2 level(s) up: SYM_VARIABLE: var4 (id=00035, line=-0001, pos=-001, type=TT_INTEGER, dval=0.000000, refs=-1) SYM_FUNCTION: bar -</pre> +</pre><br /> <h2>Definedness </h2> <pre> (integer) defined <identifier> -</pre> +</pre><br /> <p>... returns 1 if "identifier" has been defined. Returns 0 otherwise.</p> <pre> (integer) undef <identifier> -</pre> +</pre><br /> <p>... tries to undefine/delete the "identifier". Returns 1 if it succeeded, otherwise 0 is returned.</p> <h2>System </h2> <p>These are some system and interpreter specific built-in functions supported:</p> <pre> (void) end -</pre> +</pre><br /> <p>... exits the program with the exit status of 0.</p> <pre> (void) exit <integer> -</pre> +</pre><br /> <p>... exits the program with the specified exit status.</p> <pre> (integer) fork -</pre> +</pre><br /> <p>... forks a subprocess. It returns 0 for the child process and the PID of the child process otherwise! Example:</p> <pre> my pid = fork; @@ -304,24 +304,24 @@ if pid { } ifnot pid { say "I am the child process"; } -</pre> +</pre><br /> <p>To execute the garbage collector do:</p> <pre> (integer) GC -</pre> +</pre><br /> <p>It returns the number of items freed! You may wonder why most of the time, it will produce a value of 0! Fype tries to free not needed memory ASAP. This may change in future versions to gain faster execution speed!</p> <h3>I/O </h3> <pre> (any) put <any> -</pre> +</pre><br /> <p>... prints out the argument</p> <pre> (any) say <any> -</pre> +</pre><br /> <p>is the same as put, but also includes an ending newline.</p> <pre> (void) ln -</pre> +</pre><br /> <p>... just prints a new line.</p> <h2>Procedures and functions</h2> <h3>Procedures</h3> @@ -336,7 +336,7 @@ my a = 2, b = 4; foo; # Run the procedure. Print out "11\n" say c; # Print out "6\n"; -</pre> +</pre><br /> <h3>Nested procedures</h3> <p>It's possible to define procedures inside of procedures. Since procedures don't have their own scope, nested procedures will be available to the current scope as soon as the main procedure has run the first time. You may use the "defined" keyword to check if a procedure has been defined or not.</p> <pre> @@ -356,7 +356,7 @@ proc foo { foo; # Here the procedure foo will define the procedure bar! bar; # Now the procedure bar is defined! foo; # Here the procedure foo will redefine bar again! -</pre> +</pre><br /> <h3>Functions</h3> <p>A function can be defined with the "func" keyword and deleted with the "undef" keyword. Function do not yet return values and do not yet supports parameter passing. It's using local (lexical scoped) variables. If a certain variable does not exist, when It's using already defined variables (e.g. one scope above). </p> <pre> @@ -369,7 +369,7 @@ my a = 2, b = 4; foo; # Run the procedure. Print out "11\n" say c; # Will produce an error because c is out of scope! -</pre> +</pre><br /> <h3>Nested functions</h3> <p>Nested functions work the same way the nested procedures work, except that nested functions will not be available anymore after the function has been left!</p> <pre> @@ -383,14 +383,14 @@ func foo { foo; bar; # Will produce an error because bar is out of scope! -</pre> +</pre><br /> <h2>Arrays</h2> <p>Some progress on arrays has been made too. The following example creates a multidimensional array "foo". Its first element is the return value of the func which is "bar". The fourth value is a string" 3" converted to a double number. The last element is an anonymous array which itself contains another anonymous array as its final element:</p> <pre> func bar { say ”bar” } my foo = [bar, 1, 4/2, double ”3”, [”A”, [”BA”, ”BB”]]]; say foo; -</pre> +</pre><br /> <p>It produces the following output:</p> <pre> % ./fype arrays.fy @@ -401,7 +401,7 @@ bar A BA BB -</pre> +</pre><br /> <h2>Fancy stuff</h2> <p>Fancy stuff like OOP or Unicode or threading is not planed. But fancy stuff like function pointers and closures may be considered.:) </p> <h2>May the source be with you</h2> diff --git a/gemfeed/2011-05-07-perl-daemon-service-framework.html b/gemfeed/2011-05-07-perl-daemon-service-framework.html index 0d902d75..470ea939 100644 --- a/gemfeed/2011-05-07-perl-daemon-service-framework.html +++ b/gemfeed/2011-05-07-perl-daemon-service-framework.html @@ -14,7 +14,7 @@ \\_/ \ \\_/ \ \\_/ \.-, \, /-( /'-,\, /-( /'-, \, /-( / //\ //\\ //\ //\\ //\ //\\jrei -</pre> +</pre><br /> <p class="quote"><i>Published by Paul at 2011-05-07, last updated at 2021-05-07</i></p> <p>PerlDaemon is a minimal daemon for Linux and other Unix like operating systems programmed in Perl. It is a minimal but pretty functional and fairly generic service framework. This means that it does not do anything useful other than providing a framework for starting, stopping, configuring and logging. To do something useful, a module (written in Perl) must be provided.</p> <h2>Features</h2> @@ -39,7 +39,7 @@ # Alternatively: Starting in foreground ./bin/perldaemon start daemon.daemonize=no (or shortcut ./control foreground) -</pre> +</pre><br /> <p>To stop a daemon from running in foreground mode, "Ctrl+C" must be hit. To see more available startup options run "./control" without any argument.</p> <h2>How to configure</h2> <p>The daemon instance can be configured in "./conf/perldaemon.conf". If you want to change a property only once, it is also possible to specify it on the command line (which will take precedence over the config file). All available config properties can be displayed via "./control keys":</p> @@ -68,7 +68,7 @@ daemon.alivefile=./run/perldaemon.alive # Specifies the working directory daemon.wd=./ -</pre> +</pre><br /> <h2>Example </h2> <p>So let's start the daemon with a loop interval of 10 seconds:</p> <pre> @@ -83,13 +83,13 @@ Mon Jun 13 11:29:27 2011 (PID 2838): Triggering PerlDaemonModules::ExampleModule Mon Jun 13 11:29:27 2011 (PID 2838): ExampleModule Test 2 $ ./control stop Stopping daemon now... -</pre> +</pre><br /> <p>If you want to change that property forever, either edit perldaemon.conf or do this:</p> <pre> $ ./control keys daemon.loopinterval=10 > new.conf; mv new.conf conf/perldaemon.conf -</pre> +</pre><br /> <h2>HiRes event loop</h2> -<p>PerlDaemon uses `Time::HiRes` to make sure that all the events run incorrect intervals. For each loop run, a time carry value is recorded and added to the next loop run to catch up on lost time.</p> +<p>PerlDaemon uses <span class="inlinecode">Time::HiRes</span> to make sure that all the events run incorrect intervals. For each loop run, a time carry value is recorded and added to the next loop run to catch up on lost time.</p> <h2>Writing your own modules</h2> <h3>Example module</h3> <p>This is one of the example modules you will find in the source code. It should be pretty self-explanatory if you know Perl :-).</p> @@ -123,7 +123,7 @@ sub do ($) { } 1; -</pre> +</pre><br /> <h3>Your own module</h3> <p>Want to give it some better use? It's just as easy as:</p> <pre> @@ -132,8 +132,8 @@ sub do ($) { vi YourModule.pm cd - ./bin/perldaemon restart (or shortcurt ./control restart) -</pre> -<p>Now watch `./log/perldaemon.log` closely. It is a good practice to test your modules in 'foreground mode' (see above how to do that).</p> +</pre><br /> +<p>Now watch <span class="inlinecode">./log/perldaemon.log</span> closely. It is a good practice to test your modules in 'foreground mode' (see above how to do that).</p> <p>BTW: You can install as many modules within the same instance as desired. But they are run in sequential order (in future, they can also run in parallel using several threads or processes).</p> <h2>May the source be with you</h2> <p>You can find PerlDaemon (including the examples) at:</p> diff --git a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html index 5da66944..c3c4a655 100644 --- a/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html +++ b/gemfeed/2014-03-24-the-fibonacci.pl.c-polyglot.html @@ -56,7 +56,7 @@ BEGIN { $i++; } } -</pre> +</pre><br /> <p>You can find the full source code at GitHub:</p> <a class="textlink" href="https://codeberg.org/snonux/perl-c-fibonacci">https://codeberg.org/snonux/perl-c-fibonacci</a><br /> <h3>Let's run it with C and C++</h3> @@ -96,7 +96,7 @@ fib(7) = 13 fib(8) = 21 fib(9) = 34 fib(10) = 55 -</pre> +</pre><br /> <h3>Let's run it with Perl and Raku</h3> <pre> % perl fibonacci.pl.raku.c @@ -132,7 +132,7 @@ fib(7) = 13 fib(8) = 21 fib(9) = 34 fib(10) = 55 -</pre> +</pre><br /> <p>It's entertaining to play with :-).</p> <p>E-Mail me your comments to paul at buetow dot org!</p> <a class="textlink" href="../">Go back to the main site</a><br /> diff --git a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.html b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.html index 7a1253e7..4f1999d1 100644 --- a/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.html +++ b/gemfeed/2015-12-05-run-debian-on-your-phone-with-debroid.html @@ -16,7 +16,7 @@ | |_| | __/ |_) | | | (_) | | (_| | |____/ \___|_.__/|_| \___/|_|\__,_| -</pre> +</pre><br /> <p class="quote"><i>Published by Paul at 2015-12-05, last updated at 2021-05-16</i></p> <p>You can use the following tutorial to install a full-blown Debian GNU/Linux Chroot on an LG G3 D855 CyanogenMod 13 (Android 6). First of all, you need to have root permissions on your phone, and you also need to have the developer mode activated. The following steps have been tested on Linux (Fedora 23).</p> <a href="./2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png"><img src="./2015-12-05-run-debian-on-your-phone-with-debroid/Deboroid.png" /></a><br /> @@ -46,7 +46,7 @@ sudo debootstrap --foreign --variant=minbase \ --arch armel jessie jessie/ \ http://http.debian.net/debian sudo umount jessie -</pre> +</pre><br /> <h3>Copy Debian image to the phone</h3> <p>Now setup the Debian image on an external SD card on the Phone via Android Debugger as follows:</p> <pre> @@ -86,7 +86,7 @@ busybox mount --bind /storage/sdcard1 \ # Check mounts mount | grep jessie -</pre> +</pre><br /> <h3>Second debootstrap stage</h3> <p>This is to be performed on the Android phone itself (inside a Debian chroot):</p> <pre> @@ -95,7 +95,7 @@ export PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin /debootstrap/debootstrap --second-stage exit # Leave chroot exit # Leave adb shell -</pre> +</pre><br /> <h3>Setup of various scripts</h3> <p>jessie.sh deals with all the loopback mount magic and so on. It will be run later every time you start Debroid on your phone.</p> <pre> @@ -129,7 +129,7 @@ apt-get update apt-get upgrade apt-get dist-upgrade exit # Exit chroot -</pre> +</pre><br /> <h3>Entering Debroid |
