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
#Based on: | |
#http://casperfabricius.com/site/2008/09/21/keeping-git-repositories-on-dreamhost-using-ssh/ | |
[email protected] | |
GIT_DOMAIN=whatever.you.want | |
DH_USER=home/yourusername | |
YEAR=`eval date +%Y` | |
#set up on the server | |
ssh $DREAMGIT_DOMAIN 'mkdir -p '$GIT_DOMAIN'/'$YEAR'/'$1'.git && cd '$GIT_DOMAIN'/'$YEAR'/'$1'.git && git --bare init' | |
#set up locally |
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 | |
$JSON = '{events:[{title:"title", info:"info"},{title:"title", info:"info"},{title:"title", info:"info"}]}'; | |
header("Content-type: application/json"); | |
echo $_GET['callback']."($JSON);" | |
?> |
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
#include "EventDispatcher.h" | |
void EventDispatcher::addListener( Listener *l ) | |
{ | |
mListeners.push_back(l); | |
} | |
void EventDispatcher::removeListener( Listener *l ) | |
{ | |
mListeners.erase( std::remove( mListeners.begin(), mListeners.end(), l ), mListeners.end() ); |
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
//this is part of why processing is awesome | |
void keyPressed() | |
{ | |
if( key == 's') | |
{ | |
saveFrame("frames/Generic-####.png"); | |
} | |
} |
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 | |
$base_url = "http://localhost/~username"; | |
$builder = new Build($base_url); | |
$source = "index.php?about"; | |
$target = "about.html"; | |
$builder->write_file($source, $target); | |
Class Build | |
{ | |
public $url; //base url |
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
(*_*) | |
(* Navigates to each page and takes a screenshot *) | |
(* Combined a screenshot script -- http://www.macosxhints.com/article.php?story=20030115080027106 -- with some javascript *) | |
set save_location to (choose folder with prompt "Choose where to save screenshots") | |
set base_url to "http://sansumbrella.com/writing/page/" | |
set first_page to 1 | |
set last_page to 5 | |
set filename to "screenshot-" | |
tell application "Safari" |
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
/* | |
Find in Maps Bookmarklet | |
author: @sansumbrella | |
Enters the selected query into Google Maps. | |
Maps is generally location-aware, so it should pick out your city for use | |
*/ | |
(function() { |
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
void yourApp::renderTiles() | |
{ | |
//the size here doesn't matter, but it will get distorted if it's not the same ratio as your window | |
gl::TileRender tr( getWindowWidth()*4, getWindowHeight()*4 ); | |
//use the default cinder view to render from | |
tr.setMatricesWindow(getWindowWidth(), getWindowHeight()); | |
while( tr.nextTile() ) { | |
draw(); | |
} |
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
#include "cinder/app/AppBasic.h" | |
#include "cinder/params/Params.h" | |
#include "cinder/ImageIo.h" | |
#include "cinder/gl/TileRender.h" | |
#include "cinder/Utilities.h" | |
#include "cinder/Rand.h" | |
#include <vector> | |
using namespace ci; | |
using namespace ci::app; |
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
#include "cinder/app/AppBasic.h" | |
#include "cinder/ImageIo.h" | |
#include "cinder/Utilities.h" | |
#include <vector> | |
using namespace ci; | |
using namespace ci::app; | |
using std::vector; | |
class CopySurfaceApp : public AppBasic { |
OlderNewer