--- /dev/null
+title = create bootable iso from unix/osx terminal
+date = july 7 2011
+--
+
+1. <code class="prettyprint">$ diskutil list</code><br />
+Determines the device node assigned to your flash media (e.g. /dev/disk2)
+
+2. <code class="prettyprint">$ diskutil unmountDisk /dev/disk#</code><br />
+Replace # with the disk number from the last command; in the previous example, # is 2)
+
+3. <code class="prettyprint">$ sudo dd if=/path/to/example.iso of=/dev/diskN bs=1m</code><br />
+Replace <code>/path/to/example.iso</code> with the path to the iso; for example: <code>./windows7.iso</code>. After typing in your sudo password, the process will start invisibly.
+
+4. <code class="prettyprint">$ diskutil eject /dev/disk#</code><br />
+Remove your flash media device when the command completes. Done!
+
+Referenced from <a href="https://help.ubuntu.com/community/BurningIsoHowto">BurningIsoHowto</a>
+
+Bonus tip! You want to see how far the `dd` copy is coming along? Run in another terminal instance: <br />
+<code class="prettyprint">$ sudo killall -INFO dd</code><br />
+The process info will display in the original terminal.
+
--- /dev/null
+title = Linux Terminal on Windows via Cygwin
+--
+The default Cygwin install emulates a terminal in a command window similar to the DOS prompt with a limited feature set. To get a full featured x-term on windows, install Cygwin-X along with Cygwin.
+
+1. Install <a href="http://cygwin.com">Cygwin</a>
+
+2. Install the following packages:
+
+ - xorg-server (required, the Cygwin X Server)
+ - xinit (required, scripts for starting the X server: xinit, startx, startwin (and a shortcut on the Start Menu to run it), startxdmcp.bat )
+ - xorg-docs (optional, man pages)
+ - X-start-menu-icons (optional, adds shortcuts to X Clients and Server to the Start menu)
+ - any other packages (optional, openssh, version control, editors, etc)
+ - any additional fonts (optional)
+
+ <br />
+
+3. **~/.XDefaults**
+dark theme:
+<pre class="prettyprint">
+! terminal colors ------------------------------------------------------------
+! tangoesque scheme
+*background: #111111
+*foreground: #babdb6
+! Black (not tango) + DarkGrey
+*color0: #000000
+*color8: #555753
+! DarkRed + Red
+*color1: #ff6565
+*color9: #ff8d8d
+! DarkGreen + Green
+*color2: #93d44f
+*color10: #c8e7a8
+! DarkYellow + Yellow
+*color3: #eab93d
+*color11: #ffc123
+! DarkBlue + Blue
+*color4: #204a87
+*color12: #3465a4
+! DarkMangenta + Mangenta
+*color5: #ce5c00
+*color13: #f57900
+!DarkCyan + Cyan (both not tango)
+*color6: #89b6e2
+*color14: #46a4ff
+! LightGrey + White
+*color7: #cccccc
+*color15: #ffffff
+</pre>
+Some more themes on the <a href="https://bbs.archlinux.org/viewtopic.php?pid=653473">Arch forums</a>.
+<br />
+
+4. **~/.bashrc**
+To enable color `ls` and human readable size format, add:
+<pre class="prettyprint">
+alias ls='ls -h --color=tty'
+</pre>
+By default, the .bashrc in CygwinX has many options you can uncomment.
+<br />
+
+5. **~/.emacs**
+Disable emacs temp (~) file pooping
+<pre class="prettyprint">
+(setq make-backup-files nil)
+</pre>
+<br />
+
+Result:
+<img src="http://media.quilime.com/files/img/cygwin.PNG" />
\ No newline at end of file
--- /dev/null
+title = command history
+date = Mon Sep 19 19:39:51 PDT 2011
+--
+<pre class="prettyprint">history | awk {'print $2'} | sort | uniq -c | sort -k1 -rn | head</pre>
+
+example
+<pre class="prettyprint">
+// brand new netbook
+ 24 ls
+ 14 cd
+ 12 defaults
+ 9 unzip
+ 8 ssh
+ 5 mv
+ 3 mkdir
+ 3 chmod
+ 3 cat
+ 2 unrar
+</pre>
+<pre class="prettyprint">
+// quilime.com
+ 173 git
+ 140 ls
+ 84 cd
+ 18 emacs
+ 15 cat
+ 13 mv
+ 12 rm
+ 5 ln
+ 4 mkdir
+ 4 ./scripts/content
+</pre>
\ No newline at end of file
--- /dev/null
+title = command line audio on OSX
+date = Wed, Nov 9 2011 18:40:26, IST
+tags = audio osx cli
+--
+
+Since there is no equivilent to /dev/dsp or /dev/audio on OSX, you need to install an alternative like <a href="http://sox.sourceforge.net/">sox</a>.
+
+Install sox by either downloading the OSX binary from <a href="http://sox.sourceforge.net/">http://sox.sourceforge.net/</a>
+or
+install <a href="http://mxcl.github.com/homebrew/">homebrew</a>, and then install sox with <code class="prettyprint">brew install sox</code>
+
+<br />
+
+Examples:
+
+cat audio from /dev/urandom/ :
+<pre class="prettyprint">cat /dev/urandom | sox -traw -r44100 -b16 -u - -tcoreaudio</pre>
+
+<br />
+
+audio from an executable
+<pre class="prettyprint">
+cat > test.c
+main(t) {
+ for( t = 0;;t++)
+ putchar( t * ((( t >> 12 ) | (t >> 8)) & (63& (t >> 4 ))));
+}
+</pre>
+[ctrl-c]
+<pre class="prettyprint">
+gcc test.c -o test
+./test | sox -traw -r8000 -b8 -u - -tcoreaudio
+</pre>
+
+
+<br />
+
+
+links:
+
+- <a href="http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html">http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html</a>
+- <a href="http://www.bemmu.com/music/index.html">http://www.bemmu.com/music/index.html</a>
+- <a href="http://wurstcaptures.untergrund.net/music/">http://wurstcaptures.untergrund.net</a>
+
+<!--
+- <a href="http://wurstcaptures.untergrund.net/music/?oneliner=-(M%3D127)%3E(s%3D(((y%3D%5B3%2C3%2C4.7%2C2%5D%5Bp%3Dt%3E%3E14%263%5D%2F5*t)*.96%2663)%2B(y%2663))*1.2%2B(t%3E%3E16%3F(((5*t%25(m%3D2048))*(a%3D1-t%25m%2Fm)%26128)*(0x53232323%3E%3E(z%3Dt%3E%3E11%26(k%3D31))%261)*a%2B((d%3D(14*t*t%5Et)%25m*a)%26M)*(0xa444c444%3E%3Ez%261)*a*1.5%2B((a*d*(t%3E%3E9%261)%26M)%2F7.5))%2B((((h%3D%22IQNNNN!!%5D%5D!Q!IW%5DWQNN%3F%3F!!W%5DWQNNN%3F%22.charCodeAt(t%3E%3E10%2615%7Cp%2F3%3C%3C4)%2F33*t-t)%26k)%2B(h*1.99%26k)%2B(h*.49%26k)%2B(h*.97%26k)-64))*a*(2-a)*2%3A0))%3F-M%3As%3EM%3FM%3As&oneliner2=&t0=0&tmod=0&duration=30&separation=100&rate=8000">one-liner</a> from <a href="http://www.iquilezles.org">inigo quilez</a>
+
+-->
\ No newline at end of file
--- /dev/null
+title = show hidden files (OSX Finder)
+date = Tue May 10 21:03:45 PDT 2011
+tags = osx
+--
+
+via Terminal
+
+show hidden files:
+<pre class="prettyprint">
+defaults write com.apple.finder AppleShowAllFiles TRUE
+killall Finder
+</pre>
+
+hide hidden files:
+<pre class="prettyprint">
+defaults write com.apple.finder AppleShowAllFiles FALSE
+killall Finder
+</pre>
\ No newline at end of file
--- /dev/null
+title = filebrowser
+date = 2011-06-28
+--
+Updated my <a href="https://github.com/quilime/filebrowser">File Browser</a> PHP script on GitHub.
+
+preview:
+<img style="border:1px solid #ddd;" src="http://media.quilime.com/File_Browser.png" />
+
+in use:
+<a href="http://media.quilime.com/">media.quilime.com</a>
-body { margin:20px 100px 50px 30px; }
-html, body, table {
- font-family: serif;
- font-size:16px;
- line-height:1.4em;
- color:#44d;
-}
-
-
-::-moz-selection {background: #08f !important; color:#fff;}
-::selection {background: #08f !important; color:#fff;}
-
-a { color:#000; border:0; padding:0.2em 0.1em 0 0; }
-a img { border:0; }
-a.mute { text-decoration:none !important; font-weight:normal;}
-a:hover, a.mute:hover { color:#d15; text-decoration:none; }
+body { margin: 20px 100px 50px 30px }
-h1, h2, h3, h4, h5, h6 { font-family:'Droid Serif'; font-size:1em; }
-h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { }
-h1 { margin:0 0 3em 0; }
-h2 { margin:0 0 0.5em 0; }
-h3 { margin:0 0 0 0; }
-h4 { margin-top:0; }
-
-ul, li { margin:0; padding:0; list-style-type:none; }
-ol { margin:0;}
-ol li { list-style-type:decimal; }
-
-blockquote { font-family:times; background:#000; color:#aaa;
-margin:0; font-size:15px; line-height:1.4em; padding:2em 4em; font-style:italic; line-height:1.45em; max-width:600px;}
+html,
+body,
+table {
+ font-family: georgia, serif;
+ font-size: 14px;
+ line-height: 1.4em;
+ color: #44d;
+}
+::-moz-selection,
+::selection {
+ background: #08f !important;
+ color: #fff;
+}
-#content { padding-left:160px; min-width:500px; padding-bottom:200px; z-index:10; }
-#content p:first-child { margin-top:0; }
-p { max-width:720px; }
+a {
+ color: #000;
+ border: 0;
+ padding: 0.2em 0.1em 0 0;
+}
+a img { border: 0 }
+a.mute {
+ text-decoration: none !important;
+ font-weight: normal;
+}
+a:hover,
+a.mute:hover {
+ color: #d15;
+ text-decoration: none;
+}
-.nav { position:fixed; top:20px; left:20px; }
-.nav a { text-decoration:none; font-weight:bold; }
-.nav a.mute { font-weight:normal; }
-.nav h1 { }
-.index { padding:0; margin:0; }
-.index li {line-height:1.1em; margin-bottom:0.4em; }
-.index li a { text-decoration:underline; font-weight:normal; }
-.entry { margin-bottom:100px; }
-.entry h2 { padding-bottom:4px; font-size:1.3em;}
-.entry .metadata { font-style:italic; color:#bbb; }
-.entry .metadata a { color:#999; }
-.entry .metadata a:hover { color: #000;}
-.entry .metadata .tags li { display:inline-block; margin-right:0.3em; }
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ font-family: 'Droid Serif';
+ font-size: 1em;
+}
+h1 a,
+h2 a,
+h3 a,
+h4 a,
+h5 a,
+h6 a { }
+h1 { margin: 0 0 3em 0 }
+h2 { margin: 0 0 0.5em 0 }
+h3 { margin: 0 0 0 0 }
+h4 { margin-top: 0 }
+ul, li { }
+ol { margin: 0 }
+ol li { }
+blockquote {
+ font-family: times;
+ background: #000;
+ color: #aaa;
+ margin: 0;
+ font-size: 15px;
+ line-height: 1.4em;
+ padding: 2em 4em;
+ font-style: italic;
+ line-height: 1.45em;
+ max-width: 600px;
+}
+code { line-height: 2em !important; }
+#content {
+ padding-left: 160px;
+ min-width: 500px;
+ padding-bottom: 200px;
+ z-index: 10;
+}
+#content p:first-child { margin-top: 0 }
+p { max-width: 720px }
-.more, .home { text-decoration:none; color:#000; font-weight:bold; }
-table { margin:0; padding:0; border:0; }
-table .column { padding-right:100px; min-width:120px; max-width:400px; }
-table .column h2 a { text-decoration:none; }
-table h2, table h3 { margin-bottom:2em; }
-table .video li, table .image li { margin-bottom:2em; }
-table .reader li, table .bookmarks li { margin-bottom:1em; padding-bottom:1em; border-bottom:1px dotted #ddd; }
-.reader_links li, .bookmark_links li { padding-top:.75em; margin-bottom:.75em; }
-.bookmark_links li a { display:block; }
-.bookmark_links li span { font-style: italic; color:#444; }
-.image li a { background:none; }
+.nav {
+ position: fixed;
+ top: 20px;
+ left: 20px;
+}
+.nav a {
+ text-decoration: none;
+ font-weight: bold;
+}
+.nav a.mute { font-weight: normal }
+.nav li, ul.nav {
+ list-style-type:none;
+ padding:0 !important;
+ margin:0 !important ;
+}
-#footer { margin-top:120px; }
-#footer .copy a { text-decoration:none; }
+.index {
+ padding: 0;
+ margin: 0;
+}
+.index li {
+ line-height: 1.1em;
+ margin-bottom: 0.4em;
+}
+.index li a {
+ text-decoration: underline;
+ font-weight: normal;
+}
+.entry { margin-bottom: 100px }
+.entry h2 {
+ padding-bottom: 4px;
+ font-size: 1.3em;
+}
+.entry .metadata {
+ font-style: italic;
+ color: #bbb;
+}
+.entry .metadata a { color: #999 }
+.entry .metadata a:hover { color: #000 }
+.entry .metadata .tags li {
+ display: inline-block;
+ margin-right: 0.3em;
+}
+.more,
+.home {
+ text-decoration: none;
+ color: #000;
+ font-weight: bold;
+}
+table {
+ margin: 0;
+ padding: 0;
+ border: 0;
+}
+table .column {
+ padding-right: 100px;
+ min-width: 120px;
+ max-width: 400px;
+}
+table .column h2 a { text-decoration: none }
+table h2,
+table h3 { margin-bottom: 2em }
+table .video li,
+table .image li { margin-bottom: 2em }
+table .reader li,
+table .bookmarks li {
+ margin-bottom: 1em;
+ padding-bottom: 1em;
+ border-bottom: 1px dotted #ddd;
+}
+.reader_links li,
+.bookmark_links li {
+ padding-top: .75em;
+ margin-bottom: .75em;
+}
+.bookmark_links li a { display: block }
+.bookmark_links li span {
+ font-style: italic;
+ color: #444;
+}
+.image li a { background: none }
+#footer { margin-top: 120px }
+#footer .copy a { text-decoration: none }
a.rss {
- background:url("/img/rss-icon.png") no-repeat scroll right center transparent;
- padding:0 1.3em 0 0;
+ background: url("/img/rss-icon.png") no-repeat scroll right center transparent;
+ padding: 0 1.3em 0 0;
}
a.external {
- background:url("/img/external-icon.png") no-repeat scroll right center transparent;
- padding:0 1.3em 0 0;
-}
\ No newline at end of file
+ background: url("/img/external-icon.png") no-repeat scroll right center transparent;
+ padding: 0 1.3em 0 0;
+}
+
require_once 'lib/init.php';
$url = get_url();
+
list($response_format, $response_mime_type) = parse_format($url['extension'], 'html');
# setup template
$total = 0;
# content exists, and is a folder
-
+/*
if ($url['filename'] == '')
{
- $page = parse_entry(new SplFileInfo('/home/quilime/quilime.com/pages/about'), 1);
- $t->assign('data', $page);
- $template = $page['config']['template'] ? $page['config']['template'] . '.' . $response_format . '.tpl' : 'page.' . $response_format . '.tpl';
- // $template = 'index.html.tpl';
+ //$page = parse_entry(new SplFileInfo('/home/quilime/quilime.com/pages/about'), 1);
+ //$t->assign('data', $page);
+ //$template = $page['config']['template'] ? $page['config']['template'] . '.' . $response_format . '.tpl' : 'page.' . $response_format . '.tpl';
+ $template = 'index.html.tpl';
}
- else if (is_dir($content_request)) {
+ else */if (is_dir($content_request)) {
# get config in folder, if exists
if (is_file($content_request . '/' . CONFIG_FILE )) {
$config = parse_entry(new SplFileInfo($content_request . '/' . CONFIG_FILE));
/* Pretty printing styles. Used with prettify.js. */
-.str { color: #f26; }
-.kwd { color: #99f; font-weight:bold; }
+.str { color: #f26; }
+.kwd { color: #99f; font-weight:bold; }
.com { color: #888; font-style:italic; }
.typ { color: #93d44f; }
.lit { color: #099; }
.atn { color: #606; }
.atv { color: #080; }
.dec { color: #606; }
-pre.prettyprint, code.prettyprint {
-
- font-family:monaco, "Lucida Console", monospace; font-size:14px; line-height:1.5em; padding:0.4em 0.6em; background:#111111
-;
- -moz-border-radius: 8px;
- -webkit-border-radius: 8px;
+pre.prettyprint, code.prettyprint {
+ font-family:monaco, "Lucida Console", monospace; font-size:12px; line-height:1.5em; padding:0.5em 0.6em; background:#181818;
+ border-radius: 8px;
}
pre.prettyprint { padding:20px; }
.tag { color: #006; font-weight: bold; }
.atn { color: #404; }
.atv { color: #060; }
-}
\ No newline at end of file
+}
{
$path_info = pathinfo($_SERVER['SCRIPT_URL']);
$path_info['url'] = preg_match("/\.\.\//", $_SERVER['SCRIPT_URL']) ? '/' : $_SERVER['SCRIPT_URL'];
- $path_info['extension'] = null;
+ //$path_info['extension'] = null;
return $path_info; //substr($_SERVER['SCRIPT_URL'], strlen(get_base_dir() . '/'));
}
[flickr](http://flickr.com/photos/quilime/),
[delicious](http://delicious.com/quilime/),
[ffffound](http://ffffound.com/home/quilime/found/),
-[twitter](http://twitter.com/quilime/)
+[@quilime](http://twitter.com/quilime/)
-site source code: <a href="http://git.quilime.com/?p=plog.git;a=summary">plog</a>
-site update <a href="http://quilime.com/.rss" class="rss">rss</a>
+quilime.com is running on <a href="http://git.quilime.com/?p=plog.git;a=summary">plog</a>, an minimal, open source cms.
+<!--site update <a href="http://quilime.com/.rss" class="rss">rss</a>-->
<li><a href="/">home</a></li>
+ <br />
+
<? $dirs = get_dirs("", array('recursive' => 0)); ?>
<? foreach($dirs as $dir) : ?>
<li><a href="<?=$dir['url']?>"><?=$dir['name']?></a></li>
<li><a href="/photo/">photo</a></li>
<li><a href="/agg/">aggregate</a></li>
- <li><a href="/links/">links</a></li>
+ <li><a href="/links/">links</a></li>
+ <li><a href="/about/">about</a></li>
+
+ <br />
+
+ <li><a class="rss" href="/.rss">rss</a></li>
<?php $this->include_template('head-inc.html.tpl'); ?>
<title><?=SITE_TITLE?>: photo</title>
-
+ <style>
+ ul, li {
+ list-style-type:none;
+
+ }
+ ul {
+ margin:0;
+ padding:0;
+ }
+ </style>
</head>
<body>
<? $this->include_template('entry.html.tpl', array('data' => $data)); ?>
</div>
+<!--
+
+<div id="disqus_thread"></div>
+<script type="text/javascript">
+ /* * * CONFIGURATION VARIABLES: EDIT BEFORE PASTING INTO YOUR WEBPAGE * * */
+ var disqus_shortname = 'quilime'; // required: replace example with your forum shortname
+
+ // The following are highly recommended additional parameters. Remove the slashes in front to use.
+ // var disqus_identifier = 'unique_dynamic_id_1234';
+ // var disqus_url = 'http://example.com/permalink-to-page.html';
+
+ /* * * DON'T EDIT BELOW THIS LINE * * */
+ (function() {
+ var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
+ dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
+ (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
+ })();
+</script>
+<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
+<a href="http://disqus.com" class="dsq-brlink">blog comments powered by <span class="logo-disqus">Disqus</span></a>
+ -->
+
<? $this->include_template('footer.html.tpl') ?>
</body>