Skip to content

Instantly share code, notes, and snippets.

View claudioc's full-sized avatar

Claudio Cicali claudioc

View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!--
======================================================================
Tron
======================================================================
A Sublime Text 2 / Textmate theme.
Copyright (c) 2012 Dayle Rees.
Released under the MIT License <http://opensource.org/licenses/MIT>
======================================================================
@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="">
<div class="page">
<header></header>
<section class="content"></section>
<footer></footer>
</div>
.page {
display: flex;
flex-direction: column;
min-height: <anything>;

Keybase proof

I hereby claim:

  • I am claudioc on github.
  • I am claudioc (https://keybase.io/claudioc) on keybase.
  • I have a public key ASA_hkQ1KiU7760d2e-ghPssGqF3VxwlByw4OEtp4ZA4WAo

To claim this, I am signing this object:

function getUpdates() {
updateCell("B3", "ripple")
updateCell("C3", "bitcoin")
updateCell("D3", "ethereum")
updateCell("E4", "litecoin")
updateCell("F4", "iota")
}
function updateCell(cell, code) {
const response = UrlFetchApp.fetch("https://api.coinmarketcap.com/v1/ticker/" + code + "/?convert=EUR")
/* This can be the start of a module */
const makeHandler = cb => {
return {
get (object, prop, receiver) {
if (Reflect.has(object, prop)) {
return Reflect.get(...arguments)
}
return new Proxy(() => {}, {
@claudioc
claudioc / gist:4203288
Created December 4, 2012 12:26
roman to arabic onliner
$map = ["1","I","2","II","3","III","4","IV","5","V","6","VI","7","VII","8","VIII","9","IX","10","X","11","XI","12","XII","13","XIII","14","XIV","15","XV","16","XVI","17","XVII","18","XVIII","19","XIX","20","XX","21","XXI","22","XXII","23","XXIII","24","XXIV","25","XXV","26","XXVI","27","XXVII","28","XXVIII","29","XXIX","30","XXX","31","XXXI","32","XXXII","33","XXXIII","34","XXXIV","35","XXXV","36","XXXVI","37","XXXVII","38","XXXVIII","39","XXXIX","40","XL","41","XLI","42","XLII","43","XLIII","44","XLIV","45","XLV","46","XLVI","47","XLVII","48","XLVIII","49","XLIX","50","L","51","LI","52","LII","53","LIII","54","LIV","55","LV","56","LVI","57","LVII","58","LVIII","59","LIX","60","LX","61","LXI","62","LXII","63","LXIII","64","LXIV","65","LXV","66","LXVI","67","LXVII","68","LXVIII","69","LXIX","70","LXX","71","LXXI","72","LXXII","73","LXXIII","74","LXXIV","75","LXXV","76","LXXVI","77","LXXVII","78","LXXVIII","79","LXXIX","80","LXXX","81","LXXXI","82","LXXXII","83","LXXXIII","84","LXXXIV","85","LXXXV","86","LXXXVI
@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
@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)