Skip to content

Instantly share code, notes, and snippets.

View pirafrank's full-sized avatar
🎯
Focusing

Francesco Pira pirafrank

🎯
Focusing
View GitHub Profile
# See http://help.github.com/ignore-files/ for more about ignoring files.
# Based on https://gist.github.com/chrishough/6488118
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile ~/.gitignore_global
###############################################################################################
# Ignore specific config files
###############################################################################################
.bundle/*
@pirafrank
pirafrank / bash custom colors
Last active August 29, 2015 14:17
Quick and beautiful bash make up
# Terminal custom colors
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
@pirafrank
pirafrank / bash history settings
Created March 24, 2015 08:31
Elephant memory for your bash
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=10000
@pirafrank
pirafrank / fix locale errors in bash
Last active August 29, 2015 14:17
handy bash fix
#fix locale errors
export LANG="en_US.UTF-8"
export LC_ALL=$LANG
@pirafrank
pirafrank / pumascript.sh
Last active August 29, 2015 14:17 — forked from runlevel5/puma.sh
Puma manager script for your Rails application
#!/usr/bin/env bash
# This software is given AS IS, WITHOUT ANY WARRANTY.
# Simple move this file into your Rails `script` folder. Also make sure you `chmod +x puma.sh`.
# Please modify the CONSTANT variables to fit your configurations.
# The script will start with config set by $PUMA_CONFIG_FILE by default
# forked from joneslee85 https://gist.github.com/joneslee85/5844933
@pirafrank
pirafrank / filesharing2.py
Last active August 29, 2015 14:22
Local filesharing command line program written in Python
# Copyright 2014 Francesco Pira <dev@fpira.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
@pirafrank
pirafrank / PyObjc Python modules cleaner script
Created August 13, 2015 23:09
Script to clean up from pyobjc-framework Python modules
#!/bin/bash
# Cleaner script for pyobjc-framework python modules
#
# made by Francesco Pira
# fpira.com
# Given "as-is", WITHOUT ANY WARRANTY
#
# Usage:
# chmod +x ./this-script.sh
@pirafrank
pirafrank / get_platform_details.py
Created August 20, 2015 20:59
Get platform details for current OS (print or use as a library). Works with Linux, OS X and Windows.
import sys
import platform as pl
def get_os_release():
if pl.system() == "Darwin":
var = pl.mac_ver()[0] # mac release
elif pl.system() == "Linux":
var = pl.linux_distribution() # which linux distro
elif pl.system() == "Windows":

Keybase proof

I hereby claim:

  • I am pirafrank on github.
  • I am pirafrank (https://keybase.io/pirafrank) on keybase.
  • I have a public key whose fingerprint is 8CE5 6166 AD46 3442 9E3A CF7C 03F3 1E01 C9DC 0E67

To claim this, I am signing this object:

@pirafrank
pirafrank / ls aliases with coloured output
Last active December 7, 2015 10:14
ls colored output and long list ll alias
# Linux
alias ll='ls -Fhla --color=auto'
alias ls='ls -Fh --color=auto'
# OS X
alias ll='ls -Fhla'
alias ls='ls -Fh'