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 / My Sublime Text user preferences
Last active April 11, 2016 07:52
From dev to dev, Sublime Text settings that rock! (OSX compatible)
"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 April 3, 2015 07:52
A bookmarklet to copy current URL. Made in javascript.
javascript:void(prompt("To%20copy,%20press%20Ctrl+C%20(Cmd+C%20on%20OS%20X),%20then%20Enter",%20location.href))
@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 / markdown_cheatsheet.md
Last active August 4, 2018 19:12
Markdown cheatsheet

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 April 7, 2022 02:52
Quick script that use wget to download an entire website
#!/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