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
function parse_git_branch { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
GREEN="\[\033[1;32m\]" | |
YELLOW="\[\033[1;33m\]" | |
WHITE="\[\033[0;0m\]" | |
PS1="[\u@\h [$GREEN\W$YELLOW\$(parse_git_branch)$WHITE]\$ " |
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
# php 5.3 snow leopard | |
# need 64 bit mysql as /usr/local/mysql | |
# compile apache | |
./configure --enable-layout=Darwin --enable-mods-shared=all | |
make | |
sudo make install | |
# now configure php. then make; sudo make install |
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
<?php | |
echo "hello gistson"; | |
?> |
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
<?php | |
/* | |
Plugin Name: Gistson - Embedded Gist WP Plugin | |
Plugin URI: http://arin.me/blog/tag/gistson | |
Description: Use a shortcode [gist id="12345"] to embed A Gist from http://gist.github.com into your blog | |
Version: 0.1 | |
Author: Arin Sarkissian | |
Author URI: http://arin.me | |
Copyright 2009 Arin Sarkissian |
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
<?php | |
if (! isset($argv[1])) { | |
echo "enter a search term:\n"; | |
echo 'php ' . __FILE__ . " <search_term>\n"; | |
exit; | |
} | |
$term = urlencode($argv[1]); | |
$url = "http://ax.phobos.apple.com.edgesuite.net/WebObjects/MZStoreServices.woa/wa/wsSearch?limit=10&entity=software&term=$term"; |
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
package com.digg.tmp; | |
import org.neo4j.api.core.*; | |
import org.neo4j.util.index.SingleValueIndex; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
/** | |
* Hack example that reveals a "More than one relationship" issue | |
* |
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
package com.digg.tmp; | |
import org.neo4j.api.core.*; | |
import org.neo4j.util.index.SingleValueIndex; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
/** | |
* Hack example that reveals a "More than one relationship" issue |
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
package com.digg.tmp; | |
import org.neo4j.api.core.*; | |
import org.neo4j.util.index.IndexService; | |
import org.neo4j.util.index.LuceneIndexService; | |
import java.util.concurrent.ExecutorService; | |
import java.util.concurrent.Executors; | |
public class LuceneIndex { |
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
<?php | |
class UserDataAccessClass | |
{ | |
/** | |
* Get the number of followers a user has | |
* | |
* @param string $userID The user id | |
* | |
* @return int | |
*/ |
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
<?php | |
class UserDataAccessClass | |
{ | |
/** | |
* @return int | |
*/ | |
public function getNumFollowers(string $userID) | |
{ | |
return valueFromAServiceCallOrQueryEtc($userID) | |
} |