Skip to content

Instantly share code, notes, and snippets.

@Ashton-W
Ashton-W / trello.user.js
Created November 29, 2012 09:48
Trello Style Tweaks
// ==UserScript==
// @name Trello Style Tweaks
// @namespace http://userstyles.org
// @description Personal tweaks for trello.com
// @author lmjabreu
// @homepage trello.com
// @include https://trello.com/*
// @include https://www.trello.com/*
// @run-at document-start
// ==/UserScript==
@Ashton-W
Ashton-W / WWDC Video Transcripts No Scroll.user.js
Created October 13, 2015 09:05
User script that removes max-height of WWDC video transcripts, no more scrolls
// ==UserScript==
// @name WWDC Video Transcripts No Scroll
// @namespace http://wwdc/
// @version 0.1
// @description removes max-height of WWDC video transcripts, no more scrolls
// @author You
// @include https://developer.apple.com/videos/play/*
// @grant GM_addStyle
// ==/UserScript==
@Ashton-W
Ashton-W / objc.cfg
Created December 19, 2012 03:35 — forked from cspickert/objc.cfg
#
# uncrustify config file for objective-c and objective-c++
#
indent_with_tabs = 0 # 1=indent to level only, 2=indent with tabs
output_tab_size = 4 # new tab size
indent_columns = output_tab_size
indent_label = 2 # pos: absolute col, neg: relative column
indent_align_assign = FALSE
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.2 (140)
#
# Alignment
# ---------
## Alignment
@Ashton-W
Ashton-W / reverseproxy.conf
Created April 26, 2013 13:57
Figuring out how to make Apache Reverse Proxy do what I need it to do took longer than a couple minutes, leaving this here for posterity. Reverse Proxy for servers running on other ports. Shows use of subdirectory in ProxyPassReverse declaration.
<Location /sabnzb>
order deny,allow
deny from all
allow from all
ProxyPass http://localhost:8080/sabnzbd
ProxyPassReverse http://localhost:8080/sabnzbd
</Location>
<Location /couchpotato>
#appledoc Xcode script
company="Company";
companyID="au.com.Company";
companyURL="http://www.google.com";
target="iphoneos";
#target="macosx";
outputPath="Documentation";
ignore="Pods"
#!/usr/bin/osascript
-- Open Xcode Organizer
-- To use, make sure "Enable access for assistive devices" is enabled in the Universal Access pref pane
tell application "System Events"
tell process "Xcode"
-- Activate Xcode if necessary
set frontmost to true
@Ashton-W
Ashton-W / gfycat.js
Last active December 28, 2015 12:19
gfycat.com bookmarklet for Mobile Safari
javascript:location.href='http://gfycat.com/fetch/'+window.location.href
@Ashton-W
Ashton-W / UIStoryboardSegue+Assignable.m
Created November 13, 2014 06:08
I'm happy with this method of moving models around in segues. For every model that might move around, a protocol is created for assignment, and a segue category method is added to assign it to destination view controllers if they conform to it. `prepareForSegue:` sends a messages for all its models to any segue.
/***
*
* Usage:
* ```
* - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
* {
* [segue prepareWithExampleModel:self.model];
* }
* ```
*/
@Ashton-W
Ashton-W / UIColorFromHex.m
Created January 20, 2015 06:30
nice inline function for hex to UIColor
NS_INLINE UIColor *UIColorFromHex(int hex)
{
return [UIColor colorWithRed:((CGFloat)((hex & 0xFF0000) >> 16)) / 255.0f
green:((CGFloat)((hex & 0x00FF00) >> 8)) / 255.0f
blue:((CGFloat)((hex & 0x0000FF) >> 0)) / 255.0f
alpha:1.0];
}