Skip to content

Instantly share code, notes, and snippets.

View claudioc's full-sized avatar

Claudio Cicali claudioc

View GitHub Profile
@claudioc
claudioc / gist:e5c5786e0816fcf206eb
Created October 22, 2014 15:09
Easy github pull requests (with hub)
#!/bin/bash
# Get the branch
B=$(git rev-parse --abbrev-ref HEAD)
# Get the remote
R=$(git config branch.${B}.remote)
# Get the last commit message
M=$(git log -n1 --format=format:%s)
@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 :)
@claudioc
claudioc / gist:c0b7b1bf3eab18457e36
Last active April 29, 2018 07:17
Safely delete a branch, remotely and locally. I use it as ~/bin/git-purge and use it with `git purge <branch-name>`
#!/bin/bash
if [ "${1}" = "" ]; then
echo "Please specify a branch name to delete"
exit 1
fi
current=$(git symbolic-ref HEAD | sed 's/refs\/heads\///')
if [ "master" != "${current}" ]; then
echo Please move to the master branch first
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

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 / styles.less
Last active March 7, 2016 12:47
@caludio's syntax tweak for JS and CSS
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
--- The "custom" CSS, just adds a border
.left,
.right,
ons-progress-bar {
border: 1px solid magenta;
}
--- THE HTML
<!doctype html>
<html class="no-js" lang="">
#!/usr/bin/env bash
set -e
type docker >/dev/null 2>&1 || { echo >&2 "docker is not available. Aborting."; exit 1; }
GIT_BRANCH=$(git symbolic-ref HEAD | sed 's/refs\/heads\///')
# Configuration section
IMAGE_NAME=myproject
LIVE_BRANCH=master
<div class="page">
<header></header>
<section class="content"></section>
<footer></footer>
</div>
.page {
display: flex;
flex-direction: column;
min-height: <anything>;