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
# Source: http://blog.mact.me/2014/10/22/yosemite-upgrade-changes-open-file-limit | |
# Add the following to your to ~/.bash_profile | |
ulimit -n 65536 65536 | |
# Run the following commands in the terminal | |
$ echo kern.maxfiles=65536 | sudo tee -a /etc/sysctl.conf | |
$ echo kern.maxfilesperproc=65536 | sudo tee -a /etc/sysctl.conf | |
$ sudo sysctl -w kern.maxfiles=65536 |
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
# Let's face it. Ruby's Hash#to_s output isn't very useful. | |
# Here's a draft for a better version. | |
class Hash | |
def to_s | |
keys.inject([]) do |a, key| | |
a << "#{key}: #{fetch(key)}" | |
end.join(', ') | |
end | |
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
Feb 26 13:26:35 Mhupmans-iPhone-5s Socialcast[2825] <Error>: -[NSNull objectForKeyedSubscript:]: unrecognized selector sent to instance 0x39976a60 | |
Feb 26 13:26:35 Mhupmans-iPhone-5s Socialcast[2825] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull objectForKeyedSubscript:]: unrecognized selector sent to instance 0x39976a60' | |
*** First throw call stack: | |
(0x2ee6de83 0x391ce6c7 0x2ee717b7 0x2ee700af 0x2edbedc8 0x156f47 0x1569a7 0x155f6d 0x1579e7 0x1581b1 0xd9b41 0x15b2c7 0x2ee2fe71 0x2eda3ab1 0x2f7a200d 0x2f7a59c5 0x130a8b 0xd8dbd 0xc50d7 0x396b30c3 0x396b30af 0x396b59a9 0x2ee385b1 0x2ee36e7d 0x2eda1471 0x2eda1253 0x33ad52eb 0x31656845 0xba01f 0xa3da0) | |
Feb 26 13:26:35 Mhupmans-iPhone-5s ReportCrash[2826] <Notice>: ReportCrash acting against PID 2825 | |
Feb 26 13:26:35 Mhupmans-iPhone-5s ReportCrash[2826] <Notice>: Formulating crash report for process Socialcast[2825] | |
Feb 26 13:26:35 Mhupmans-iPhone-5s com.apple.launchd[1] (UIKitApplication:com.socialcast.Social |
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
<div> | |
<div> | |
<br /> | |
</div> | |
<!-- Leave this out for gmail --> | |
<!-- <p style="background-color: rgb(255, 255, 255); margin: 0px;"><font color="#999999" style="font-family: arial, sans-serif;">----------------------------------------------------------------------------------------------</font></p> --> | |
<div style="color: rgb(34, 34, 34); font-family: arial, sans-serif;"> | |
<br /> |
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
RAC(self, isSomethingEnabled, @(YES)/*default value i'm refering to*/) = RACObserve(self, someOtherDangle); |
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
# One-liner to check if repo directory exists. If so, attempt to enter and `git pull`. Otherwise, `git clone` | |
if [ -d citrrusbuilder ]; then cd citrrusbuilder && git pull && cd ..; else git clone [email protected]:citrrus/citrrusbuilder.git citrrusbuilder; fi |
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
User = describe 'User', -> | |
property 'username', String | |
property 'password_hash', String | |
property 'password_salt', String | |
set 'restPath', pathTo.users |
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
class User < ActiveRecord::Base | |
attr_accessible :username, :password | |
attr_accessor :password | |
def password=(password) | |
self.password_salt = "salty" | |
self.password_hash = "#{password}#{self.password_salt}" | |
end | |
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
#!/bin/sh | |
PROJ=`find . -name '*.xib' -o -name '*.[mh]' -o -name '*.storyboard' -o -name '*.mm'` | |
for png in `find . -name '*.png'` | |
do | |
name=`basename -s .png $png` | |
name=`basename -s @2x $name` | |
if ! grep -q $name $PROJ; then | |
echo "$png" | |
fi |
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
// privateBundleIdentifier is our custom implementation of bundleIdentifier in a NSBundle category | |
[NSBundle swizzle:@selector(bundleIdentifier) toMethod:@selector(privateBundleIdentifier) forBlock:^{ | |
[Crashlytics startWithAPIKey:CRASHLYTICS_API_KEY]; | |
}]; |
NewerOlder