From 7a6ba1ec274dc90c77cc10b36161aecb9fa7d909 Mon Sep 17 00:00:00 2001 From: Gabriel Dunne Date: Fri, 16 Dec 2011 15:54:39 -0800 Subject: [PATCH] Updateed aggregate and added a few articles --- content/code/linux_terminal_win_via_cygwin | 69 ---------------------- content/code/osx_print_json | 11 ++-- lib/output.php | 3 + pages/about | 4 +- pages/projects | 2 +- templates/nav.html.tpl | 1 + 6 files changed, 12 insertions(+), 78 deletions(-) delete mode 100644 content/code/linux_terminal_win_via_cygwin diff --git a/content/code/linux_terminal_win_via_cygwin b/content/code/linux_terminal_win_via_cygwin deleted file mode 100644 index 02e3cb0..0000000 --- a/content/code/linux_terminal_win_via_cygwin +++ /dev/null @@ -1,69 +0,0 @@ -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/osx_print_json b/content/code/osx_print_json index c84c92d..1c8284e 100644 --- a/content/code/osx_print_json +++ b/content/code/osx_print_json @@ -3,6 +3,8 @@ date = mon, nov 14 2011 tags = bash shell python json xml osx -- +Working with various interfaces that output json or xml results in lots of situations where you have a single-line, unformatted output. Here's a quick way to format json, xml from the CLI. + via the command line: format json @@ -10,11 +12,6 @@ format json cat unformatted.json | python -m json.tool -save formated json to file -
-cat unformatted.json | python -m json.tool > formatted.json
-
- format json from clipboard
 pbpaste | python -m json.tool
@@ -24,5 +21,7 @@ format xml from clipboard
 
 pbpaste | xmllint --format -
 
-`xmllint` is part of libxml2 and installed by default on OSX. +`xmllint` is part of libxml2 and installed by default on OSX. Be aware that xmllint cleans up XML as well as formatting it, ocassionally modifying the output. + +for all above examples, you can pipe back to the clipboard with | pbcopy at the end of the command, or output to a file with > output.json or > output.xml. diff --git a/lib/output.php b/lib/output.php index 328df1a..502aa99 100644 --- a/lib/output.php +++ b/lib/output.php @@ -27,6 +27,7 @@ function parse_format($format, $default) 'js' => 'application/x-javascript', 'xspf' => 'application/xspf+xml', 'xml' => 'text/xml', + 'rss' => 'text/xml', 'jpg' => 'image/jpeg', 'png' => 'image/png', 'm3u' => 'audio/x-mpegurl'); @@ -133,6 +134,8 @@ function get_rss_feed( $url ) curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); $data = curl_exec($ch); + + curl_close($ch); return new SimpleXMLElement($data); } diff --git a/pages/about b/pages/about index 1b89431..d5d6efe 100644 --- a/pages/about +++ b/pages/about @@ -11,8 +11,8 @@ by **gabriel dunne** ([www](http://gabrieldunne.com), [email](mai [ffffound](http://ffffound.com/home/quilime/found/), [@quilime](http://twitter.com/quilime/) -quilime.com has taken many forms, originally operating as my online portfolio. -View an archive of all projects. +quilime.com has taken many forms +View an archive of all projects. site update rss diff --git a/pages/projects b/pages/projects index ebf525d..4e787c6 100644 --- a/pages/projects +++ b/pages/projects @@ -5,7 +5,7 @@ title = projects [works 4](http://portfolio.quilime.com/2008/) [works 3](http://portfolio.quilime.com/new/port.php) [works 2](http://portfolio.quilime.com/recent.html) -[works 1](http://quilime.com/main.php) +[works 1](http://portfolio.quilime.com/archive/)
diff --git a/templates/nav.html.tpl b/templates/nav.html.tpl index 6e24b7a..db4d193 100644 --- a/templates/nav.html.tpl +++ b/templates/nav.html.tpl @@ -10,6 +10,7 @@
  • +
  • projects
  • photo
  • aggregate
  • links
  • -- 2.34.1