This file contains 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
# ~/.bash_profile | |
# Eric Boehs's git aliases | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias gc='git commit -v' | |
alias gd='git diff | mate' | |
alias gl='git pull' | |
alias gp='git push' | |
alias gst='git status' |
This file contains 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
# ~/.bash_profile | |
# Eric Boehs's git aliases | |
alias gb='git branch' | |
alias gba='git branch -a' | |
alias gc='git commit -v' | |
alias gd='git diff | mate' | |
alias gl='git pull' | |
alias gp='git push' | |
alias gst='git status' |
This file contains 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 | |
PS=$( | |
ps auxc | | |
head -6 | | |
tail -5 | | |
awk '{ | |
printf("%6s %s %s %6.2f%s", $2" ",$3"\t",$4"\t",$6/1024,"M\t"); | |
for (i = 10 + 1; i <= NF; i++ ) | |
printf("%s ", $i); | |
print ""; |
This file contains 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 | |
# rgi by Eric Boehs | |
# I like to put this in my ~/bin (which I put in my path) as rgi (remote git initialize) | |
# Specify your remote user@server here | |
[email protected]; | |
# ====================== | |
# = END OF USER CONFIG = | |
# ====================== |
This file contains 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
# Migrating from your Unfuddle git repo to GitHub | |
cd YOUR_GIT_REPO | |
git remote rm unfuddle | |
git remote add origin [email protected]:opubco/YOUR_REPO_NAME.git | |
git push origin master | |
# If you don't like typing git push origin master, set it up in your .git/config | |
echo '[remote "origin"] | |
url = [email protected]:opubco/YOUR_REPO_NAME.git | |
fetch = +refs/heads/master:refs/remotes/origin/master |
This file contains 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
<? | |
#PHP REST client | |
$url = 'http://localhost:8080/classica/api/listings/5'; | |
$method = 'PUT'; | |
$headers = array( | |
'Accept: application/json', | |
'Content-Type: application/x-www-form-urlencoded' | |
); | |
$dataarr = array( |
This file contains 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 | |
## Screenshot script for Mac OS X | |
## Author: Eric Boehs | |
## URL: ericboehs.com | |
# Set these variables: | |
USERNAME=ericboehs | |
SERVER=ericboehs.com | |
DIR=\~/ericboehs.com/screenshots/ | |
FILENAME=`date +%Y%m%d-%H%M%S` |
This file contains 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
<? | |
echo "<pre>"; | |
// This example should work but some http servers will not respond properly to a HEAD request | |
// i.e. google.com | |
$url = 'http://ericboehs.com/uploads/gahr-1.png'; | |
$ch = curl_init(); | |
if (!$ch) |
This file contains 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
<? | |
echo "<pre>"; | |
// This example should work but some http servers will not respond properly to a HEAD request | |
// i.e. google.com | |
$url = 'http://ericboehs.com/uploads/gahr-1.png'; | |
$ch = curl_init(); | |
if (!$ch) |
This file contains 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
<? | |
$feed_stub = array('xml', 'feed', 'player', 'stats.xml'); | |
foreach($feed_stub as $i => $f){ | |
if($i == count($feed_stub)-1) | |
continue; | |
$feed_path .= "[$f]"; | |
} | |
$test{$feed_path} = 'blah'; // Result: $test[[foo][bar]] => blah | |
//Desired result: $test[foo][bar] => blah |
OlderNewer