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
\documentclass[a4paper,abstract=on,12pt]{scrartcl} | |
\usepackage{amssymb,amsmath} | |
\usepackage[a4paper]{geometry} | |
\geometry{margin=1in} | |
\usepackage{setspace} | |
\onehalfspacing | |
% These commands keep the koma system from making sans serif section headings |
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
Compiled jquery.tmpl.js (0ms) (pid 22675) | |
Compiled jquery.ui.datepicker-lb.js (1ms) (pid 22675) | |
Compiled jquery.ui.datepicker.js (1ms) (pid 22675) | |
Compiled jquery.ui.core.js (1ms) (pid 22675) | |
Compiled jquery.js (1ms) (pid 22675) | |
Compiled jquery.ui.datepicker-lv.js (1ms) (pid 22675) | |
Compiled jquery.ui.datepicker-vi.js (1ms) (pid 22675) | |
Compiled jquery.ui.datepicker-cy-GB.js (1ms) (pid 22675) | |
Compiled jquery.effects.clip.js (1ms) (pid 22675) | |
Compiled jquery.effects.core.js (0ms) (pid 22675) |
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
def self.nested_include(nested_attribute, additional_attributes=[], nesting_level=6) | |
attributes = additional_attributes | |
nesting_level.times do | |
attributes = additional_attributes + [{nested_attribute => attributes}] | |
end | |
includes(attributes) | |
end | |
scope :with_nesting, nested_include(:children_ordered, [:user, :project]) |
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
file = '/Users/skattyadz/Dropbox/PlainText/FYP.txt' | |
toc = '' | |
number_stack = [0] | |
File.readlines(file).each do |line| | |
if line[0] == '#' | |
hash_count = line.count('#') | |
if hash_count > number_stack.length | |
# down a level |
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
// ==UserScript== | |
// @name iPlayer Filter | |
// @namespace http://skatty.me/ | |
// @description Hides crap shows from BBC iPlayer | |
// @include http://bbc.co.uk/iplayer/* | |
// @include http://www.bbc.co.uk/iplayer/* | |
// ==/UserScript== | |
var load,execute,loadAndExecute;load=function(a,b,c){var d;d=document.createElement("script"),d.setAttribute("src",a),b!=null&&d.addEventListener("load",b),c!=null&&d.addEventListener("error",c),document.body.appendChild(d);return d},execute=function(a){var b,c;typeof a=="function"?b="("+a+")();":b=a,c=document.createElement("script"),c.textContent=b,document.body.appendChild(c);return c},loadAndExecute=function(a,b){return load(a,function(){return execute(b)})}; |
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
config.after_initialize do | |
class<<Rails.logger | |
def debug_with_color(message) | |
message_color = "0;32;1" | |
colored_message = "\e[#{message_color}m#{message}\e[0m" | |
debug_without_color(colored_message) | |
end | |
alias_method_chain :debug, :color | |
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
console.log("triggered: "+eventName+" for "+(this.get('name')||this.get('description')||'collection')) |
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
#import <Foundation/Foundation.h> | |
@interface SKUserData : NSMutableDictionary | |
+ (id)sharedInstance; | |
@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
#!/usr/bin/env ruby | |
# Heavily based on https://github.com/ip2k/twitter-avatar-update | |
# ==== Gems ==== | |
require 'twitter_oauth' | |
require 'oauth' | |
require 'nokogiri' | |
require 'open-uri' | |
require 'yaml' |
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
Handlebars.registerHelper('numberWithCommas', function(x) { | |
return x.toString().replace(/\B(?=(?:\d{3})+(?!\d))/g, ","); | |
}); |