Skip to content

Instantly share code, notes, and snippets.

View borella's full-sized avatar

Bruno Borella borella

View GitHub Profile
@borella
borella / gist:fb5ae6a25cda12e3abb4
Created September 10, 2014 18:52
Clean Up Google Drive Icon Files
find . -name 'Icon*' -type f -delete
@borella
borella / gist:323584e4e6e848668a0b
Created September 9, 2014 11:26
Exemplo retorno da busca
{
totalCourses: 10,
totalVideos: 1,
courses: [],
videos: []
}
'{ "steps": { "00:09": { "itemId": "79", "time": "9000", "title_pt": "1 pêra", "title_en": "1 pear" }, "00:10": { "itemId": "2", "time": "1000", "title_pt": "½ maçã", "title_en": "½ maçã" }, "00:13": { "itemId": "11", "time": "13500", "title_pt": "100g mirtilos congelados", "title_en": "100g frozen blueberries" }, "00:16": { "itemId": "56", "time": "16500", "title_pt": "Suco de 1 limão", "title_en": "Juice of 1 lime" }, "00:18": { "itemId": "62", "time": "18000", "title_pt": "Folhas de hortelã", "title_en": "Fresh mint leaves" } } }'
@borella
borella / gist:1d8ea944d4947a03d796
Created May 7, 2014 14:35
xcode 5 ios sdk path
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
var win = Ti.UI.createWindow({ backgroundColor: '#fff' });
var rotate = Ti.UI.create2DMatrix().rotate(90);
var counterRotate = rotate.rotate(-180);
var scrollView = Titanium.UI.createScrollableView({
views:[
Titanium.UI.createImageView({ image:'default_app_logo.png', transform: counterRotate }),
Titanium.UI.createImageView({ image:'KS_nav_ui.png', transform: counterRotate }),
Titanium.UI.createImageView({ image:'KS_nav_views.png', transform: counterRotate })
@borella
borella / gist:11285316
Created April 25, 2014 10:48
Google Chrome with local file access on Mac OS X
open /Applications/Google\ Chrome.app --args --allow-file-access-from-files
@borella
borella / gist:7796800
Last active December 30, 2015 07:38
validate regex
FULL NAME
var reg = /^(?:[\u00c0-\u01ffa-zA-Z'-]){2,}(?:\s[\u00c0-\u01ffa-zA-Z'-]{2,})+$/i;
EMAIL
var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
MAX CHARS
var reg = /^.{8,50}$/;
CEP
@borella
borella / gist:7650303
Last active December 29, 2015 09:29
Fix "An application restart is required" Titanium SDK - Android
<property name="ti.android.bug2373.disableDetection" type="bool">true</property>
<property name="ti.android.bug2373.restartDelay" type="int">500</property>
<property name="ti.android.bug2373.finishDelay" type="int">0</property>
<property name="ti.android.bug2373.skipAlert" type="bool">true</property>
<property name="ti.android.bug2373.message"/>Initializing</property>
<property name="ti.android.bug2373.title">Restart Required</property>
<property name="ti.android.bug2373.buttonText">Continue</property>
<property name="ti.android.bug2373.finishfalseroot" type="bool">true</property>