Skip to content

Instantly share code, notes, and snippets.

View warthurton's full-sized avatar

Wayne Arthurton warthurton

View GitHub Profile
@warthurton
warthurton / config.rb
Created February 23, 2012 04:04
Octopress config.rb
# Require any additional compass plugins here.
project_type = :stand_alone
# Publishing paths
http_path = "/"
http_images_path = "http://cdn.warthurton.com/images"
http_fonts_path = "http://cdn.warthurton.com/fonts"
css_dir = "http://cdn.warthurton.com/public/stylesheets"
# Local development paths
@warthurton
warthurton / tmux.conf
Created March 2, 2012 17:56
TMUX config
# Make it use C-a, similar to screen..
unbind C-b
unbind l
set -g prefix C-a
bind-key C-a last-window
bind-key a send-prefix
set -g base-index 1
# Reload key
@warthurton
warthurton / gist:2294351
Created April 3, 2012 18:16
Booleans are cool
public boolean isBooleanFalse(boolean value) {
boolean response = false;
if (value == true) {
response = false;
} else {
response = true;
}
return response;
}
(?:^|,)(\\\"(?:[^\\\"]+|\\\"\\\")*\\\"|[^,]*)
@echo off
nircmdc speak text "hello"
echo %errorlevel%
pause
nircmdc speak text "goodbye"
echo %errorlevel%
pause
@warthurton
warthurton / gist:6084142
Last active December 20, 2015 06:09
nircmd test
@echo off
setlocal enableextensions
call nircmdc speak text "hello"
echo %errorlevel%
pause
call nircmdc speak text "goodbye"
echo %errorlevel%
pause
@warthurton
warthurton / gist:6166746
Created August 6, 2013 17:44
Test gist
New test gist
@warthurton
warthurton / BrowsePeople.lsml.js
Last active December 27, 2015 10:09
LightSwitch HTML Commanding with TheLightSwitchToolbox.WebApiCommanding.Server
/// <reference path="../GeneratedArtifacts/viewModel.js" />
myapp.BrowsePerson.PeopleCommanding_ItemTap_execute = function (screen) {
$.post("../api/Command/FirstCommand",
{ Parameter1: screen.People.selectedItem.Id, Parameter2: screen.People.selectedItem.FirstName },
function (data) {
if (data != null) {
screen.CommandReturn = data.Parameter2.toString();
return true;
}
- (NSInteger)colorNumber
{
if (_colorNumber < 0) {
NSString *hashName = self.nickname.lowercaseString;
if ([RZUserDefaults() boolForKey:@"UUIDBasedNicknameColorHashing"]) {
hashName = [NSString stringWithUUID];
}
self.colorNumber = (hashName.hash % _colorNumberMax);
#!/usr/bin/ruby
# Example custom processor for use with Marked <http://markedapp.com> and Jekyll _posts
# It's geared toward my personal set of plugins and tags, but you'll get the idea.
# It turns
# {% img alignright /images/heythere.jpg 100 100 "Hey there" "hi" %}
# into
# <img src="../images/heythere.jpg" alt="Hey there" class="alignright" title="hi" />
#
# replaces alignleft and alignright classes with appropriate style attribute
# ---