Skip to content

Instantly share code, notes, and snippets.

View andreagalle's full-sized avatar
💭
Whatever Works - Basta che funzioni

Andrea Gallegati andreagalle

💭
Whatever Works - Basta che funzioni
View GitHub Profile
@jsjohnst
jsjohnst / gist:68455
Created February 22, 2009 12:47
Bash profile options for color and vi mode
# useful general .bash_profile tweaks for color loving VI fans
export TERM=xterm-color
export GREP_OPTIONS='--color=auto' GREP_COLOR='1;36'
export CLICOLOR=1
alias ls='ls -G'
export LS_COLORS='di=1:fi=0:ln=31:pi=5:so=5:bd=5:cd=5:or=31:mi=0:ex=35:*.rb=90'
export COLOR_NC='\e[0m' # No Color
export COLOR_WHITE='\e[1;37m'
export COLOR_BLACK='\e[0;30m'
@Sharpie
Sharpie / .vimrc
Created January 27, 2010 01:24
A vim profile file designed for editing Fortran source code
" Ensure correct syntax highlighting and auto-indentation for Fortran free-form
" source code.
let fortran_free_source=1
let fortran_do_enddo=1
filetype plugin indent on
syntax on
" Turn on line numbers and row/column numbers.
set nu
/*
* Bookmarklet for viewing source in iPad Safari
* Originally from http://www.ravelrumba.com/blog/ipad-view-source-bookmarklet/
*/
javascript:(function(){
var w = window.open('about:blank'),
s = w.document;
s.write('<!DOCTYPE html><html><head><title>Source of ' + location.href + '</title><meta name="viewport" content="width=720, maximum-scale=1.0, minimum-scale=1.0, initial-scale=1.0" /></head><body></body></html>');
@chrisjacob
chrisjacob / README.md
Created July 16, 2011 11:23
How to: GitHub Pages "gh-pages" branch for User & Organization Pages

GitHub Pages "Normal" Setup for User & Organization Pages

Let’s say your GitHub username is “alice”. If you create a GitHub repository named alice.github.com, commit a file named index.html into the master branch, and push it to GitHub, then this file will be automatically published to http://alice.github.com/... The same works for organizations.

Read more here: http://pages.github.com/

However... the downside of this is that anyone that forks this repo won't get it as a GitHub Pages repo when they are working on it... because they have a different GitHub "username" (or "organisation name").

So the trick is to not use a master branch as the documentation tells you... rather, use a gh-pages branch, as you would for your other "Project Pages".

@ramnathv
ramnathv / gh-pages.md
Created March 28, 2012 15:37
Creating a clean gh-pages branch

Creating a clean gh-pages branch

This is the sequence of steps to follow to create a root gh-pages branch. It is based on a question at [SO]

cd /path/to/repo-name
git symbolic-ref HEAD refs/heads/gh-pages
rm .git/index
git clean -fdx
echo "My GitHub Page" &gt; index.html
@gregelin
gregelin / .vimrc
Created January 21, 2013 17:11
Example vimrc file that provides line numbers and syntax coloring from http://vim.wikia.com/wiki/Example_vimrc
" URL: http://vim.wikia.com/wiki/Example_vimrc
" Authors: http://vim.wikia.com/wiki/Vim_on_Freenode
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Features {{{1
"
@cobyism
cobyism / gh-pages-deploy.md
Last active June 26, 2024 23:06
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@wildmichael
wildmichael / README.md
Created March 1, 2013 11:24
superscript test

This is some superscript text.

@hemmer
hemmer / Makefile
Last active January 31, 2020 18:24
Example of FFTW transforms with various indexing methods. See printDataFourier for examples.
program_NAME := fourier
CC = cc
program_C_SRCS := $(wildcard *.c) $(wildcard */*.c)
program_C_OBJS := ${program_C_SRCS:.c=.o}
program_OBJS := $(program_C_OBJS) $(program_CXX_OBJS)
program_INCLUDE_DIRS :=
program_LIBRARY_DIRS :=
program_LIBRARIES := pthread fftw3 m gsl gslcblas
program_FLAGS := -Wall -Wextra -g -std=c99 -Wshadow
#program_FLAGS := -Wall -Wextra -O3 -std=c99 -Wshadow
@nateware
nateware / make_favicon.sh
Last active June 27, 2024 16:02
Imagemagick to create favicon.ico with 16x16 and 32x32 sizes in it
# IE is still braindead so still use favicon.ico
convert -resize x16 -gravity center -crop 16x16+0+0 -flatten -colors 256 input.png output-16x16.ico
convert -resize x32 -gravity center -crop 32x32+0+0 -flatten -colors 256 input.png output-32x32.ico
convert output-16x16.ico output-32x32.ico favicon.ico
# Then, HTML needs to specify size="XxY" as largest size due to browser bugs
<link rel="shortcut icon" href="/favicon.ico" sizes="32x32">