Skip to content

Instantly share code, notes, and snippets.

Francesco Pira pirafrank

Block or report user

Report or block pirafrank

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 .gitignore for Rails app
# 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 Aug 29, 2015
Quick and beautiful bash make up
View bash custom colors
# 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 Mar 24, 2015
Elephant memory for your bash
View bash history settings
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=10000
View fix locale errors in bash
#fix locale errors
export LANG="en_US.UTF-8"
export LC_ALL=$LANG
@pirafrank
pirafrank / pumascript.sh
Last active Aug 29, 2015 — forked from joneslee85/puma.sh
Puma manager script for your Rails application
View pumascript.sh
#!/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 / My Sublime Text user preferences
Last active Apr 11, 2016
From dev to dev, Sublime Text settings that rock! (OSX compatible)
View My Sublime Text user preferences
"hey, don't care about me!"
the purpose of this file is just to properly name the gist (silly Github!).
@pirafrank
pirafrank / Copy URL Bookmarklet
Created Apr 3, 2015
A bookmarklet to copy current URL. Made in javascript.
View Copy URL Bookmarklet
javascript:void(prompt("To%20copy,%20press%20Ctrl+C%20(Cmd+C%20on%20OS%20X),%20then%20Enter",%20location.href))
@pirafrank
pirafrank / filesharing2.py
Last active Aug 29, 2015
Local filesharing command line program written in Python
View filesharing2.py
# 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.
View markdown_cheatsheet.md

Markdown Cheat Sheet

THIS IS NOT MY WORK. Credits to the creator of sublimetext-markdown-preview.


This is a sample markdown file to help you write Markdown quickly :)

If you use the fabulous [Sublime Text 2/3 editor][ST] along with the [Markdown Preview plugin][MarkdownPreview], open your ST2 Palette with CMD+⇧+P then choose Markdown Preview in browser to see the result in your browser.

@pirafrank
pirafrank / download_entire_website.sh
Last active May 26, 2018
Quick script that use wget to download an entire website
View download_entire_website.sh
#!/bin/bash
if [[ $# != 2 ]]; then
echo "Error: wrong number of arguments"
echo ""
echo "Usage: ./download-entire-website.sh <domain> <url>"
echo "Example ./download-entire-website.sh websitetodownload.com www.websitetodownload.com/page/"
echo ""
exit -1
fi
You can’t perform that action at this time.