Skip to content

Instantly share code, notes, and snippets.

Claudio Cicali claudioc

Block or report user

Report or block claudioc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View fs-api.ts
import * as fs from 'fs'
import * as path from 'path'
import { promisify } from 'util'
// About returning promises inside an async ts method
// https://github.com/Microsoft/TypeScript/issues/5254
type ScanDirOptions = {
match?: RegExp
exclude?: RegExp
View gist:0e7b1f85eb3449258faf8cb94ea8a2c7
-- Contenuto del tsconfig.json
{
// Enable support for importing CommonJS modules targeting es6 modules
"esModuleInterop": true,
// When using above interop will get missing default export error from type check since
// modules use "export =" instead of "export default", enable this to ignore errors.
"allowSyntheticDefaultImports": true
}
@claudioc
claudioc / g.sh
Last active Aug 13, 2018
Simplest git shortcuts wrapper
View g.sh
#!/usr/bin/env bash
# Simple shortcut wrapper to your most common git commands
# Easy to extend, and passes all the unrecognized command through the
# `git` command itself (i.e. `g rebase master` => `git rebase master`)
# Traps any error (see https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html)
set -e -o pipefail -u
cmd=${1}
argc=${#}
View method_missing.js
/* 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(() => {}, {
View cryptoupdates.gs
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")
View keybase.md

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:

View An awesome fish prompt
If you use fish and want to try Powerline:
Install oh-my-fish https://github.com/oh-my-fish/oh-my-fish
Install bobthefish (for the git support)
Follow the instructions above, or:
1. Install fisherman (https://github.com/fisherman/fisherman)
2. Install powerline with `sudo pip install powerline-status` (or https://github.com/banga/powerline-shell not sure about the diff)
3. Install shellder with `sudo fisher install simnalamburt/shellder` (https://github.com/simnalamburt/shellder)
4. Install powerline-patched fonts (https://github.com/powerline/fonts)
View gist:628f006bf1cfb8371b3546bef3b91a28
<div class="page">
<header></header>
<section class="content"></section>
<footer></footer>
</div>
.page {
display: flex;
flex-direction: column;
min-height: <anything>;
View docker.sh
#!/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
View gist:f32ebf9cb1572077f450db5b8cf2d18b
--- 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="">
You can’t perform that action at this time.