This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# tmuxConnect SessionName FileWithMachineNames | |
# | |
# pass a file with a list of machine names as a parameter to this script | |
# and it will open a new tmux session with a window ssh'd into each host | |
SESSION=$1 | |
MACHINE_FILE=$2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# URL: http://mysite/?project=foo&category=bar&task=yo | |
<html> | |
<body> | |
<?php | |
foreach ($_GET as $key => $value) { | |
echo "key = $key :: value = $value"; | |
echo "<br/>"; | |
} | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -m SimpleHTTPServer 4020 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Javascript in Ten Minutes | |
// Breakdown... | |
// Basic Types | |
var intValue = 1; | |
var floatValue = 3.0; | |
var stringValue = "This is a string\n"; | |
var sqString = 'This is also a string'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat myOldFile | |
HelloJesseAndGlen | |
IHopeThatYouAreChillin | |
$ irb | |
>> myNewFile = File.open('myNewFile', 'w') | |
=> #<File:myNewFile> | |
>> File.open('myOldFile').each { |line| | |
?> myNewFile.puts line.scan(/[A-Z][a-z]+/) * " " | |
>> } | |
=> #<File:myOldFile> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
myNewFile = File.open('myNewFile', 'w') | |
File.open(ARGV[0]).each do |line| | |
i = 0 | |
line.each_byte do |c| | |
while i < line.length | |
if (line[i] =~ /[A-Z]/) and ((line[i-1] =~ /[a-z]/) or (line[i-1] =~ /[,.:;!?]/)) | |
myNewFile.printf " %c", line[i] | |
else | |
myNewFile.printf"%c", line[i] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
presidents = {} | |
presidents["jefferson"] = "3","virginia" | |
presidents["truman"] = "33","missouri" | |
presidents["obama"] = "44","hawaii" | |
presidents.each do |k,v| | |
surname = k |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grep -ilr "foo" * | xargs -i@ sed -i 's/foo/bar/' @ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
l/* | |
Theme Name: Cordobo Green Park 2 | |
Theme URI: http://cordobo.com/green-park-2/ | |
Description: Lightweight fast-rendering theme with 2-3 column layout and right sidebar, Widget-ready (4 slots), built-in support for plugins (e.g. twitter), support for threaded/nested comments, fully localized, easy to customize via settings-page. By <a href="http://cordobo.com">Andreas Jacob</a>. | |
Version: 0.9.502 | |
Author: Andreas Jacob | |
Author URI: http://cordobo.com/ | |
Tags: green, white, silver, black, light, two-columns, right-sidebar, fixed-width | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
</head> | |
<body> | |
<pre></pre> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script> | |
<script> | |
var HTML_FILE_URL = 'data.txt'; | |
$(document).ready(function() { |