Skip to content

Instantly share code, notes, and snippets.

View ringmaster's full-sized avatar

Owen Winkler ringmaster

View GitHub Profile
@chrismeller
chrismeller / gist:1339633
Created November 4, 2011 15:44
Github Packager
<?php
class Github_Packager {
private static $api_endpoint = 'http://github.com/api/v2/json/';
private static $temp_path = './temp/';
public static function list_branches ( $addon_name, $with_commits = false ) {
$url = self::$api_endpoint . 'repos/show/habari-extras/' . $addon_name . '/branches';
@ringmaster
ringmaster / gist:1481722
Created December 15, 2011 16:27 — forked from chrismeller/gist:1339633
Github Packager
<?php
class Github_Packager {
private static $api_endpoint = 'http://github.com/api/v2/json/';
private static $temp_path = './temp/';
public static function list_branches ( $addon_name, $with_commits = false ) {
$url = self::$api_endpoint . 'repos/show/habari-extras/' . $addon_name . '/branches';
@chrismeller
chrismeller / vhost.com
Created January 10, 2012 20:52
Standard Nginx Vhost
server {
include listen_80;
server_name vhost.com;
include /etc/nginx/fastcgi_params;
access_log /home/chris/public_html/vhost.com/logs/access.log;
error_log /home/chris/public_html/vhost.com/logs/error.log;
root /home/chris/public_html/vhost.com/public;
@michaeltwofish
michaeltwofish / gist:1702154
Created January 30, 2012 02:45
Get the last PHP error
lasterror() {
logpath=/usr/local/www-conf/logs/$1-phplog;
error=(${(f)$(awk -F: '/PHP Fatal error|\[error\]/ { lines[last] = NR } END { print lines[last] }' $logpath)});
[[ -n $error ]] && tail -n +$error $logpath
}
@rjorgenson
rjorgenson / README.md
Last active June 2, 2020 14:42
Bear Journal

I created these scripts to generate some daily and monthly notes in Bear.

The launchd scripts will run the daily script every day at 3am and the monthly script on the first of every month at 2am. Make sure to update the path to the actual scripts in the launchd scripts before loading them.

mv com.bearjournal.daily.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.bearjournal.daily.plist

mv com.bearjournal.monthly.plist ~/Library/LaunchAgents/
launchctl load ~/Library/LaunchAgents/com.bearjournal.monthly.plist