Skip to content

Instantly share code, notes, and snippets.

View claudioc's full-sized avatar

Claudio Cicali claudioc

View GitHub Profile
{
// Details: https://github.com/victorporof/Sublime-JSHint#using-your-own-jshintrc-options
// Example: https://github.com/jshint/jshint/blob/master/examples/.jshintrc
// Documentation: http://www.jshint.com/docs/
"browser": true,
"jquery": true,
"node": true,
"esnext": false,
"globals": {},
"laxcomma": true,
@claudioc
claudioc / gist:82f36dba4f74a4ebd858
Created October 22, 2014 14:47
Easy pull request (needs hub)
#!/bin/bash
B=$(git rev-parse --abbrev-ref HEAD)
M=$(git log -n1 --format=format:%s)
DEF_TITLE="${M} - ${B}"
read -e -p "Provide the issue number: " ISSUEN
read -e -p "Provide a meaningful title [${DEF_TITLE}]: " TITLE
TITLE="${TITLE:-$DEF_TITLE}"
echo
echo hub pull-request -m \"${ISSUEN} ${TITLE}\" -h claudioc:${B}
@claudioc
claudioc / gist:5114554f68e5a026c26d
Created October 22, 2014 14:50
Easy pull request (needs hub)
#!/bin/bash
B=$(git rev-parse --abbrev-ref HEAD)
M=$(git log -n1 --format=format:%s)
DEF_TITLE="${M} - ${B}"
read -e -p "Provide the issue number: " ISSUEN
read -e -p "Provide a meaningful title [${DEF_TITLE}]: " TITLE
TITLE="${TITLE:-$DEF_TITLE}"
echo
echo hub pull-request -m \"${ISSUEN} ${TITLE}\" -h claudioc:${B}
@claudioc
claudioc / gist:734c1116fea890d21cc5
Last active August 29, 2015 14:09
Cyanogen nightly on Xperia T
Cyanogen doesn't accept bug reports on nightly builds, so here is a list of GOOD and BAD things I am experiencing with my Xperia T.
What to expect (pros):
- better battery life (I'd say 30% more)
- better performances (50% more responsive)
- better camera performances (starts in just 1sec)
- Google Play Services seem to be (finally) under control - no battery drain
- 4.4.x goodness - no need for "Enter" for the PIN unlock, oh joy :)
apis.google.com: 7 request(s)
fonts.gstatic.com: 2 request(s)
accounts.google.com: 1 request(s)
ssl.gstatic.com: 1 request(s)
oauth.googleusercontent.com: 1 request(s)
@claudioc
claudioc / gist:318eb8e44825a0b580ac
Last active August 29, 2015 14:18
How hard would it be to setup a machine from scratch, uh?
- chrome
- chrome canary
- Firefox
- bettertouchtool
- setup touchpad and keyboard
- command line tools / Xcode
- brew
- brew install fish
- brew install node
- brew install hub
#!/bin/bash
MY_S=( )
main() {
local current
local branch=${1}
local branches
local idx=0

Keybase proof

I hereby claim:

  • I am claudioc on github.
  • I am claudioc (https://keybase.io/claudioc) on keybase.
  • I have a public key whose fingerprint is D429 740A 0B64 C08D 3574 DC67 8A06 CCBC 7E45 FDA1

To claim this, I am signing this object:

@claudioc
claudioc / gist:4188239
Created December 2, 2012 11:08
Roman <=> Integer (Ruby)
module RomanEmpire
emperor = "Claudio Cicali"
@numbers = {
:letters => [ "M", "D", "C", "L", "X", "V", "I" ],
:integers => [ "1000", "500", "100", "50", "10", "5", "1" ]
}
def RomanEmpire.romanFor(integer)
@claudioc
claudioc / gist:5546590
Created May 9, 2013 09:42
[DSL O2] How to remove the redirection to o2suchedns.aol.de and make it point to Google
# Put this line in your /etc/hosts
127.0.0.1 o2suchedns.aol.de
# Create a VirtualHost like this and restart Apache
<VirtualHost *:80>
ServerName o2suchedns.aol.de
RewriteEngine On
RewriteCond %{QUERY_STRING} query=(.*)
RewriteRule ^aol/afe_x$ https://www.google.com/search?q=%1 [L]
</VirtualHost>