+++ /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
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
cat unformatted.json | python -m json.tool
</pre>
-save formated json to file
-<pre class="prettyprint">
-cat unformatted.json | python -m json.tool > formatted.json
-</pre>
-
format json from clipboard
<pre class="prettyprint">
pbpaste | python -m json.tool
<pre class="prettyprint">
pbpaste | xmllint --format -
</pre>
-`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 <code class="prettyprint">| pbcopy</code> at the end of the command, or output to a file with <code class="prettyprint">> output.json</code> or <code class="prettyprint">> output.xml</code>.
'js' => 'application/x-javascript',
'xspf' => 'application/xspf+xml',
'xml' => 'text/xml',
+ 'rss' => 'text/xml',
'jpg' => 'image/jpeg',
'png' => 'image/png',
'm3u' => 'audio/x-mpegurl');
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$data = curl_exec($ch);
+
+
curl_close($ch);
return new SimpleXMLElement($data);
}
[ffffound](http://ffffound.com/home/quilime/found/),
[@quilime](http://twitter.com/quilime/)
-quilime.com has taken many forms, originally operating as my online portfolio.
-<a href="http://portfolio.quilime.com/">View an archive</a> of all projects.
+quilime.com has taken many forms
+<a href="/projects/">View an archive</a> of all projects.
site update <a href="http://quilime.com/.rss" class="rss">rss</a>
[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/)
<br />
<li><a href="<?=$dir['url']?>"><?=$dir['name']?></a></li>
<? endforeach; ?>
+ <li><a href="/projects/">projects</a></li>
<li><a href="/photo/">photo</a></li>
<li><a href="/agg/">aggregate</a></li>
<li><a href="/links/">links</a></li>