From: Gabriel Dunne Date: Thu, 10 Nov 2011 07:37:28 +0000 (-0800) Subject: updated aggregate and templates X-Git-Url: https://git.quilime.com/?a=commitdiff_plain;h=7a88360fc767547b8dc4fbb776ed098ab393ac86;p=plog.git updated aggregate and templates --- diff --git a/content/code/bootable_iso b/content/code/bootable_iso new file mode 100644 index 0000000..643aba5 --- /dev/null +++ b/content/code/bootable_iso @@ -0,0 +1,22 @@ +title = create bootable iso from unix/osx terminal +date = july 7 2011 +-- + +1. $ diskutil list
+Determines the device node assigned to your flash media (e.g. /dev/disk2) + +2. $ diskutil unmountDisk /dev/disk#
+Replace # with the disk number from the last command; in the previous example, # is 2) + +3. $ sudo dd if=/path/to/example.iso of=/dev/diskN bs=1m
+Replace /path/to/example.iso with the path to the iso; for example: ./windows7.iso. After typing in your sudo password, the process will start invisibly. + +4. $ diskutil eject /dev/disk#
+Remove your flash media device when the command completes. Done! + +Referenced from BurningIsoHowto + +Bonus tip! You want to see how far the `dd` copy is coming along? Run in another terminal instance:
+$ sudo killall -INFO dd
+The process info will display in the original terminal. + diff --git a/content/code/linux_terminal_win_via_cygwin b/content/code/linux_terminal_win_via_cygwin new file mode 100644 index 0000000..02e3cb0 --- /dev/null +++ b/content/code/linux_terminal_win_via_cygwin @@ -0,0 +1,69 @@ +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 Cygwin + +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) + +
+ +3. **~/.XDefaults** +dark theme: +
+! 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
+
+Some more themes on the Arch forums. +
+ +4. **~/.bashrc** +To enable color `ls` and human readable size format, add: +
+alias ls='ls -h --color=tty'
+
+By default, the .bashrc in CygwinX has many options you can uncomment. +
+ +5. **~/.emacs** +Disable emacs temp (~) file pooping +
+(setq make-backup-files nil)
+
+
+ +Result: + \ No newline at end of file diff --git a/content/code/mostused b/content/code/mostused new file mode 100644 index 0000000..30944b1 --- /dev/null +++ b/content/code/mostused @@ -0,0 +1,32 @@ +title = command history +date = Mon Sep 19 19:39:51 PDT 2011 +-- +
history | awk {'print $2'} | sort | uniq -c | sort -k1 -rn | head
+ +example +
+// brand new netbook
+  24 ls
+  14 cd
+  12 defaults
+   9 unzip
+   8 ssh
+   5 mv
+   3 mkdir
+   3 chmod
+   3 cat
+   2 unrar
+
+
+// quilime.com
+ 173 git
+ 140 ls
+  84 cd
+  18 emacs
+  15 cat
+  13 mv
+  12 rm
+   5 ln
+   4 mkdir
+   4 ./scripts/content
+
\ No newline at end of file diff --git a/content/code/osx_command_line_audio b/content/code/osx_command_line_audio new file mode 100644 index 0000000..e2db2b1 --- /dev/null +++ b/content/code/osx_command_line_audio @@ -0,0 +1,48 @@ +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 sox. + +Install sox by either downloading the OSX binary from http://sox.sourceforge.net/ +or +install homebrew, and then install sox with brew install sox + +
+ +Examples: + +cat audio from /dev/urandom/ : +
cat /dev/urandom | sox -traw -r44100 -b16 -u - -tcoreaudio
+ +
+ +audio from an executable +
+cat > test.c
+main(t) {
+  for( t = 0;;t++)
+    putchar( t * ((( t >> 12 ) | (t >> 8)) & (63& (t >> 4 ))));
+}
+
+[ctrl-c] +
+gcc test.c -o test
+./test | sox -traw -r8000 -b8 -u - -tcoreaudio
+
+ + +
+ + +links: + +- http://countercomplex.blogspot.com/2011/10/algorithmic-symphonies-from-one-line-of.html +- http://www.bemmu.com/music/index.html +- http://wurstcaptures.untergrund.net + + \ No newline at end of file diff --git a/content/code/osx_hidden_files b/content/code/osx_hidden_files new file mode 100644 index 0000000..3520ee3 --- /dev/null +++ b/content/code/osx_hidden_files @@ -0,0 +1,18 @@ +title = show hidden files (OSX Finder) +date = Tue May 10 21:03:45 PDT 2011 +tags = osx +-- + +via Terminal + +show hidden files: +
+defaults write com.apple.finder AppleShowAllFiles TRUE
+killall Finder
+
+ +hide hidden files: +
+defaults write com.apple.finder AppleShowAllFiles FALSE
+killall Finder
+
\ No newline at end of file diff --git a/content/log/filebrowser b/content/log/filebrowser new file mode 100644 index 0000000..f037e18 --- /dev/null +++ b/content/log/filebrowser @@ -0,0 +1,10 @@ +title = filebrowser +date = 2011-06-28 +-- +Updated my File Browser PHP script on GitHub. + +preview: + + +in use: +media.quilime.com diff --git a/css/style.css b/css/style.css index 9e8f7be..beb508a 100644 --- a/css/style.css +++ b/css/style.css @@ -1,75 +1,172 @@ -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; +} + diff --git a/index.php b/index.php index 561395a..924aa4a 100644 --- a/index.php +++ b/index.php @@ -3,6 +3,7 @@ require_once 'lib/init.php'; $url = get_url(); + list($response_format, $response_mime_type) = parse_format($url['extension'], 'html'); # setup template @@ -15,15 +16,15 @@ $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)); diff --git a/js/prettify/prettify.css b/js/prettify/prettify.css index 6bc2e15..8e332a8 100644 --- a/js/prettify/prettify.css +++ b/js/prettify/prettify.css @@ -1,7 +1,7 @@ /* 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; } @@ -11,12 +11,9 @@ .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; } @@ -31,4 +28,4 @@ pre.prettyprint { padding:20px; } .tag { color: #006; font-weight: bold; } .atn { color: #404; } .atv { color: #060; } -} \ No newline at end of file +} diff --git a/lib/output.php b/lib/output.php index faac3fd..328df1a 100644 --- a/lib/output.php +++ b/lib/output.php @@ -172,7 +172,7 @@ function get_url() { $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() . '/')); } diff --git a/pages/about b/pages/about index 5df3532..93cd4e5 100644 --- a/pages/about +++ b/pages/about @@ -9,10 +9,10 @@ by **gabriel dunne** ([www](http://gabrieldunne.com), [email](mai [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: plog -site update rss +quilime.com is running on plog, an minimal, open source cms. + diff --git a/templates/nav.html.tpl b/templates/nav.html.tpl index 559b841..6e24b7a 100644 --- a/templates/nav.html.tpl +++ b/templates/nav.html.tpl @@ -3,6 +3,8 @@
  • home
  • +
    + 0)); ?>
  • @@ -10,7 +12,12 @@
  • photo
  • aggregate
  • -
  • links
  • +
  • links
  • +
  • about
  • + +
    + +
  • rss
  • diff --git a/templates/photo.html.tpl b/templates/photo.html.tpl index 911f992..ef9e4d0 100644 --- a/templates/photo.html.tpl +++ b/templates/photo.html.tpl @@ -4,7 +4,16 @@ include_template('head-inc.html.tpl'); ?> <?=SITE_TITLE?>: photo - + diff --git a/templates/single.html.tpl b/templates/single.html.tpl index 91a416f..79d12ea 100644 --- a/templates/single.html.tpl +++ b/templates/single.html.tpl @@ -14,6 +14,28 @@ include_template('entry.html.tpl', array('data' => $data)); ?> + + include_template('footer.html.tpl') ?>