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
#! /usr/bin/env python | |
import os, re | |
def main(): | |
"""Fix the stupid merge conflicts..""" | |
for root, dirs, files in os.walk('.'): | |
if '.git' in dirs: | |
dirs.remove('.git') # don't visit .git directories |
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
#! /usr/bin/env python | |
import os, re | |
from optparse import OptionParser | |
""" | |
Helper script for making releases | |
- Bumps version numbers | |
- Updates changelog urls |
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 | |
$filename = '/Users/markstory/Desktop/cakefest_2010_prize_draw.txt'; | |
$file = file_get_contents($filename); | |
$people = explode("\n", $file); | |
$header = <<<TEXT | |
__ __ _ ____ ____ ____ __ _____ | |
/ /` / /\ | |_/ | |_ | |_ | |_ ( (` | | | |
\_\_, /_/--\ |_| \ |_|__ |_| |_|__ _)_) |_| |
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 | |
$options = array( | |
'repo' => '/Users/predominant/Projects/cakephp/2.0/.git', | |
'titleOrder' => array( | |
'dev', 'alpha', 'beta', 'rc', | |
), | |
'regex' => '/(?<version>[\d\.]+)(?:-(?<title>[a-zA-Z]+)(?:(?<iteration>\d)?))?/', | |
'formats' => array( | |
'plaintext' => '| awk \'{print "Commit: ["$1"]\n"; $1=""; print "-"$0"\n"}\'', | |
'lighthouse' => '| awk \'{print "#### Commit: ["$1"](http://github.com/cakephp/cakephp/commit/"$1")\n"; $1=""; print $0"\n"}\'', |
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
~/Sites/cake_dev(1.3) $ git push origin 1.3 | |
Counting objects: 24, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (13/13), done. | |
Writing objects: 100% (13/13), 1.53 KiB, done. | |
Total 13 (delta 11), reused 0 (delta 0) | |
remote: /data/github/current/config/basic/redis.rb:13: private method `split' called for nil:NilClass (NoMethodError) | |
remote: from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
remote: from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
remote: from /data/github/current/config/basic/resque.rb:3 |
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
var fs = require('fs'); | |
function readFiveBytes(filePosition) { | |
var readFile = function (err, fd) { | |
if (err) { | |
console.log(err.message); | |
return; | |
} |
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
http://jenkins/view/Radiator/api/json?tree=jobs[name,color,buildable,healthReport[description,score,iconUrl],builds[culprits[fullName],changeSet[items[msg]]]] |
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
public function test() { | |
$this->autoRender = false; | |
$data = array( | |
array( | |
'Article' => array( | |
'id' => '1', | |
'user_id' => '1', | |
'title' => 'First Article', | |
'body' => 'First Article Body' |
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
// Front controller for our API | |
var application_root = __dirname; | |
var express = require("express"); | |
var path = require("path"); | |
var pg = require('pg'); | |
var app = express.createServer(); | |
var model = require('transactionmodel); | |
var tm = new model.TransactionModel(pg); |
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
I have my model here: | |
// transactionmodel.js | |
function TransactionModel() { | |
var pg = require('pg'); | |
var connectionString = "pg://chartjes:******@localhost:5432/ibl_stats"; | |
this.client = new pg.Client(connectionString); | |
this.client.connect(); | |
this.getCurrent = function(callback) { |
OlderNewer