Skip to content

Instantly share code, notes, and snippets.

View simonecorsi's full-sized avatar
🦄
Magic unicorn between machine and people

Simone Corsi simonecorsi

🦄
Magic unicorn between machine and people
View GitHub Profile
@simonecorsi
simonecorsi / itemFactory.js
Created May 6, 2015 12:09
AngularFire Item Management Factory
'use strict';
// Remenber to add firebase/AngularFire scripts in you index.html
// FB_URL define .constant("FB_URL", "http://<firebase>.firebase.io")
angular.module("ItemFactory", [])
.factory("ItemData",function(FB_URL, $firebase, Auth){
var ref = new Firebase(FB_URL);
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
#!/bin/bash
#set -x
# Shows you the largest objects in your repo's pack file.
# Written for osx.
#
# @see http://stubbisms.wordpress.com/2009/07/10/git-script-to-show-largest-pack-objects-and-trim-your-waist-line/
# @author Antony Stubbs
# set the internal field spereator to line break, so that we can iterate easily over the verify-pack output
@simonecorsi
simonecorsi / base64 black GIF.js
Created November 4, 2016 16:58
Plain base64 gif I use in some jsx conditionals src=""
const blackBase64Gif = 'data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs='
@simonecorsi
simonecorsi / git-create-remote.sh
Last active January 16, 2018 04:59
This function will walk you through the creation of a remote repository on github without wasting your precious time going to the website :)
# This function will walk you through the creation of a remote repository on github
# without wasting your precious time going to the website :)
# how:
# - source it in your (bash|zsh)rc
# - change the alias at the bottom of the script to your needs
# - call it, follow instructions... profit
function createRemoteGitRepository() {
local RED='\033[0;31m'
local NC='\033[0m' # No Color
local GITHUB_USER=''
{
"ab":{
"name":"Abkhaz",
"nativeName":"аҧсуа"
},
"aa":{
"name":"Afar",
"nativeName":"Afaraf"
},
"af":{
@simonecorsi
simonecorsi / Caddyfile
Created June 27, 2018 12:30 — forked from electerious/Caddyfile
Most complete list of mime types in the correct format for the Caddy mime directive
mime {
.atom application/atom+xml
.json application/json
.map application/json
.topojson application/json
.jsonld application/ld+json
.rss application/rss+xml
.geojson application/vnd.geo+json
.rdf application/xml
.xml application/xml
@simonecorsi
simonecorsi / MimeTypes.js
Last active June 27, 2018 12:34
I'm tired.
const MimeTypes = {
documents: [
'application/pdf',
'application/msword',
'application/msword',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/vnd.openxmlformats-officedocument.wordprocessingml.template',
'application/vnd.ms-word.document.macroEnabled.12',
'application/vnd.ms-word.template.macroEnabled.12',
'application/vnd.ms-excel',
@simonecorsi
simonecorsi / ffmpeg-compress-mp4
Created July 20, 2018 14:09 — forked from lukehedger/ffmpeg-compress-mp4
Compress mp4 using FFMPEG
$ ffmpeg -i input.mp4 -vcodec h264 -acodec mp2 output.mp4
@simonecorsi
simonecorsi / sync-projects
Created July 30, 2018 09:42 — forked from nathanbrauer/sync-projects
Gitlab: Clone / Pull all projects in a group
#!/usr/bin/env bash
# Documentation
# https://docs.gitlab.com/ce/api/projects.html#list-projects
if [[ `whoami` == "root" ]]; then
echo "DO NOT run this program as root! Quitting."
exit 1
fi