Skip to content

Instantly share code, notes, and snippets.

View cdesch's full-sized avatar
🏠
Working from home

cdesch cdesch

🏠
Working from home
View GitHub Profile
@cdesch
cdesch / Procfile
Created November 4, 2014 15:27
Dukko unicorn.rb
web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb
inputs = %w[
CollectionSelectInput
DateTimeInput
FileInput
GroupedCollectionSelectInput
NumericInput
PasswordInput
RangeInput
StringInput
TextInput
@cdesch
cdesch / gist:07f73ae5d172bef2cf9a
Created March 27, 2015 16:59
UpTimeEvent.java
package com.kickinespresso.apps.myuptime;
import android.os.SystemClock;
import com.orm.SugarRecord;
import java.util.Date;
import java.util.List;
import android.util.Log;
import static android.text.format.DateUtils.formatElapsedTime;
import java.util.Calendar;
@cdesch
cdesch / gist:e79faeba20042ba7d033
Created March 31, 2015 18:07
Sugar Roboelectric Dbug
cjs-MBP15:sugar cj$ export ANDROID_HOME=~/Library/Android/sdk/
cjs-MBP15:sugar cj$ gradle build test --stacktrace
Download https://repo1.maven.org/maven2/org/robolectric/robolectric/2.4/robolectric-2.4.pom
Download https://repo1.maven.org/maven2/org/robolectric/robolectric-parent/2.4/robolectric-parent-2.4.pom
Download https://repo1.maven.org/maven2/org/robolectric/robolectric-annotations/2.4/robolectric-annotations-2.4.pom
Download https://repo1.maven.org/maven2/org/objenesis/objenesis/1.3/objenesis-1.3.pom
Download https://repo1.maven.org/maven2/org/objenesis/objenesis-parent/1.3/objenesis-parent-1.3.pom
Download https://repo1.maven.org/maven2/com/almworks/sqlite4java/sqlite4java/0.282/sqlite4java-0.282.pom
Download https://repo1.maven.org/maven2/org/sonatype/oss/oss-parent/4/oss-parent-4.pom
Download https://repo1.maven.org/maven2/org/ow2/asm/asm/5.0.1/asm-5.0.1.pom
@cdesch
cdesch / gist:d7c3b622d99807eeae2f
Created March 31, 2015 18:44
All Sugar Gradle Tests Failing
cjs-MBP15:sugar cj$ gradle build test --stacktrace
WARNING: Dependency commons-logging:commons-logging:1.1.1 is ignored for debugUnitTest as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.3 is ignored for debugUnitTest as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency commons-logging:commons-logging:1.1.1 is ignored for releaseUnitTest as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.3 is ignored for releaseUnitTest as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with
@cdesch
cdesch / gist:bc050cd1324df40f469e
Created April 3, 2015 17:57
Ubuntu Network Interace Teaming
ethtool
ifup
ifdown
ifconfig -a
# The loopback network interface
auto lo
iface lo inet loopback
PhaseScriptExecution Compile\ Metal\ Shaders /Users/cj/Library/Developer/Xcode/DerivedData/test2-bkzmlvgkzmttrxgwtknwjroronjm/Build/Intermediates/test2.build/Debug-iphonesimulator/test2\ iOS.build/Script-D352B47A19EC5D8A00829775.sh
cd /Users/cj/XcodeProjects/test2.spritebuilder
export ACTION=build
export AD_HOC_CODE_SIGNING_ALLOWED=NO
export ALTERNATE_GROUP=staff
export ALTERNATE_MODE=u+w,go-w,a+rX
export ALTERNATE_OWNER=cj
export ALWAYS_SEARCH_USER_PATHS=NO
export ALWAYS_USE_SEPARATE_HEADERMAPS=YES
export APPLE_INTERNAL_DEVELOPER_DIR=/AppleInternal/Developer
@cdesch
cdesch / Ruby
Last active October 14, 2019 19:26
Rails Regex
#regex templates
#Subdomain
#ensure there are no special characters and the subdomain does not end with a - or _
/^[a-z\d]+([-_][a-z\d]+)*$/i
#title
/[a-zA-Z0-9.\s]+/i
# ensure secret contains at least one number
Process: Xcode [27251]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.3.2 (7718)
Build Info: IDEFrameworks-7718000000000000~2
App Item ID: 497799835
App External ID: 812404257
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [27251]
Process: Xcode [17168]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 6.3.2 (7718)
Build Info: IDEFrameworks-7718000000000000~2
App Item ID: 497799835
App External ID: 812404257
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [17168]