Skip to content

Instantly share code, notes, and snippets.

View riosc's full-sized avatar

Carlos David Rios Vertel riosc

  • Santiago, Chile.
View GitHub Profile
curl -X PUT http://uprds.cl/api/visits/8185269309 -H 'Content-type: application/json' -H 'Authorization: Token token="_QzH4cGiyA39Jg-QVETT"' -d '{"visit":{"audit_items_attributes":[{"answer":"false", "id":"392295", "remote_image_url":"https://up-tmp.s3.amazonaws.com/392295visita_20150425_184618.jpeg"}, {"answer":"true", "id":"392306", "remote_image_url":"https://up-tmp.s3.amazonaws.com/392306visita_20150425_184630.jpeg"}, {"answer":"false", "id":"392317", "remote_image_url":"https://up-tmp.s3.amazonaws.com/392317visita_20150425_184642.jpeg"}, {"answer":"true", "id":"392328", "remote_image_url":"https://up-tmp.s3.amazonaws.com/392328visita_20150425_184653.jpeg"}, {"answer":"false", "id":"392339", "remote_image_url":"https://up-tmp.s3.amazonaws.com/392339visita_20150425_184704.jpeg"}, {"answer":"true", "id":"392350", "remote_image_url":"https://up-tmp.s3.amazonaws.com/392350visita_20150425_184715.jpeg"}, {"answer":"false", "id":"392361", "remote_image_url":"https://up-tmp.s3.amazonaws.com/392361visita_20150425_
curl -X PUT http://uprds.cl/api/visits/7453892508 -H 'Content-type: application/json' -H 'Authorization: Token token="_QzH4cGiyA39Jg-QVETT"' -d '{"visit":{"audit_items_attributes":[{"id":"279220"},{"id":"279221"},{"answer":"false","id":"279222","remote_image_url":"https://up-tmp.s3.amazonaws.com/279222visita_20141226_111046.jpeg"},{"id":"279223"},{"answer":"true","id":"279224","remote_image_url":"https://up-tmp.s3.amazonaws.com/279224visita_20141226_111056.jpeg"},{"answer":"false","id":"279225","remote_image_url":"https://up-tmp.s3.amazonaws.com/279225visita_20141226_111105.jpeg"},{"answer":"true","id":"279226","remote_image_url":"https://up-tmp.s3.amazonaws.com/279226visita_20141226_111115.jpeg"},{"id":"279227"},{"answer":"false","id":"279228","remote_image_url":"https://up-tmp.s3.amazonaws.com/279228visita_20141226_111124.jpeg"},{"id":"279229"},{"answer":"true","id":"279230","remote_image_url":"https://up-tmp.s3.amazonaws.com/279230visita_20141226_111133.jpeg"},{"id":"279231"},{"answer":"false","id":"279232
@riosc
riosc / gist:11070126
Last active August 29, 2015 14:00
links
https://www.docker.io
http://speakingjs.com/es5/ch01.html#_syntax
@riosc
riosc / gist:11024605
Created April 18, 2014 04:16
autolayout in cell
http://stackoverflow.com/questions/18746929/using-auto-layout-in-uitableview-for-dynamic-cell-layouts-variable-row-heights
@riosc
riosc / gist:10437512
Created April 11, 2014 02:18
detect ios version
http://stackoverflow.com/questions/7848766/how-can-we-programmatically-detect-which-ios-version-is-device-running-on
@riosc
riosc / gist:10024494
Created April 7, 2014 17:22
padding texfield ios
- (CGRect)textRectForBounds:(CGRect)bounds {
return CGRectMake(bounds.origin.x + 10, bounds.origin.y + 13,
bounds.size.width - 20, bounds.size.height - 16);
}
- (CGRect)editingRectForBounds:(CGRect)bounds {
return [self textRectForBounds:bounds];
}
@riosc
riosc / gist:9776781
Last active August 29, 2015 13:57
Efective Objective C 2.0
1. Prefer @class instead of #import as posible
- In headers files use @class, in implementation file use #import
- For protocol, separarte the protocol in other file (h)
2. Prefere literals instead of class methods
@YES, @1, @5.45f, ...
3. Prefer static cons instead of prepocesor # define
DURATION 0.3
static const NSInterval duration = 0.3; this is visible in implementatio file only
@riosc
riosc / gist:9744996
Last active August 29, 2015 13:57
compile project command line android
http://stackoverflow.com/questions/15285331/how-to-compile-apk-from-command-line
http://developer.android.com/tools/building/building-cmdline.html
http://www.androidengineer.com/2010/06/using-ant-to-automate-building-android.html
@riosc
riosc / gist:9244466
Last active August 29, 2015 13:56
generating java code from xml android xslt
http://stackoverflow.com/questions/14926123/generating-java-source-code-using-mixins-from-xml
http://stackoverflow.com/questions/2960122/generate-java-code-in-eclipse
http://www.vogella.com/tutorials/XSLT/article.html
http://www.abbeyworkshop.com/howto/xslt/ant_XSLT/
http://stackoverflow.com/questions/2960122/generate-java-code-in-eclipse
http://stackoverflow.com/questions/3581251/how-do-i-fix-unexpected-element-target-antliborg-apache-tools-anttarget
http://stackoverflow.com/questions/3469371/xslt-value-of-text-associated-with-element
http://stackoverflow.com/questions/16406952/use-xslt-to-find-node-and-specific-attribute-value
http://www.w3schools.com/XSL/xsl_templates.asp
@riosc
riosc / gist:9214363
Created February 25, 2014 18:04
android null variables on background
http://stackoverflow.com/questions/151777/saving-activity-state-in-android
http://stackoverflow.com/questions/9541688/static-variable-null-when-returning-to-the-app
http://stackoverflow.com/questions/4797187/android-static-variable-null-on-low-memory
http://stackoverflow.com/questions/11884387/can-static-variable-value-be-nulled-by-system-in-android-app