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
- (void)loadDefaultSettings | |
{ | |
NSMutableDictionary *defaults = [NSMutableDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Default-Settings" ofType:@"plist"]]; | |
// other setup... | |
[[NSUserDefaults standardUserDefaults] registerDefaults:[NSDictionary dictionaryWithDictionary:defaults]]; | |
} | |
- (void)resetDefaultSettings |
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
#!/bin/sh | |
echo "Stripping PPC from Growl framework..." | |
cd "${BUILT_PRODUCTS_DIR}/${PRODUCT_NAME}.app/Contents/Frameworks/Growl.framework/Versions/Current" | |
lipo ./Growl -verify_arch ppc | |
if test $? -ne 1 ; then | |
lipo ./Growl -remove ppc -output ./Growl | |
fi |
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
# Uncrustify 0.59 | |
# | |
# General options | |
# | |
# The type of line endings | |
newlines = auto # auto/lf/crlf/cr | |
# The original size of tabs in the input |
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
# Copies the selected tweet's URL from Twitter.app, and | |
# opens corresponding page for Aaron Swartz's Twitter Viewer. | |
# | |
# Original by John Gruber: https://gist.github.com/1440914 | |
# This version by Daniel Jalkut | |
# | |
# I'm hooking this up to a keyboard shortcut specifically in Twitter.app, | |
# using my scripting utility FastScripts. | |
# | |
# Requires "Access for Assistive Devices" to be enabled. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
import { Model } from "@vuex-orm/core"; | |
import { required, maxLength, minLength } from "vuelidate/lib/validators"; | |
export default class Comment extends Model { | |
static fields() { | |
return { | |
id: this.attr(null), | |
text: this.string(""), | |
}; | |
} |
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
<form v-model="$v.valid" @submit.prevent="submit"> | |
<input | |
type="text" | |
v-model.trim="$v.form.text.$model" | |
@input="$v.form.text.$touch()" | |
@blur="$v.form.text.$touch()" | |
/> | |
<button @click="submit">Submit</button> | |
</form> |