Skip to content

Instantly share code, notes, and snippets.

View pi3r's full-sized avatar
🐒
💻

Pierre Nespo pi3r

🐒
💻
View GitHub Profile
@dogmatic69
dogmatic69 / bashrc.sh
Created October 19, 2010 18:27
make git prompt more useful
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
@mikhailov
mikhailov / installation.sh
Created November 23, 2010 15:18
nginx+passenger (real production config)
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
bash -c '
if [ ! -f /usr/local/lib/rvm ]; then
echo Boostrapping with RVM
apt-get update
apt-get install -y language-pack-fr
apt-get install -y git-core curl
apt-get install -y build-essential binutils-doc gcc autoconf flex bison
apt-get install -y libreadline5-dev zlib1g-dev libssl-dev libxml2-dev libxslt1-dev libcurl4-openssl-dev
bash < <( curl -L http://bit.ly/rvm-install-system-wide )
(
@stephanschubert
stephanschubert / optimized_google_plusone.js
Created June 7, 2011 17:48
Optimized Google PlusOne Javascript - Asynchronous/Non-Blocking, Minimal + SSL Fix
<!-- Place this tag just before your close body tag and NOT in your <head> -->
<script>
(function(d, t) {
var g = d.createElement(t),
s = d.getElementsByTagName(t)[0];
g.async = true;
g.src = 'https://apis.google.com/js/plusone.js';
s.parentNode.insertBefore(g, s);
})(document, 'script');
</script>
@ivar
ivar / install.sh
Created June 17, 2011 16:39 — forked from mrrooijen/install.sh
Ruby 1.9.2 c.load patch with RVM
#!/bin/sh
#install me via:
#curl https://raw.github.com/gist/1031770/8d8400cbca40faa18bccc29d2f4d4b66371f5d7f/install.sh | sh
curl https://raw.github.com/gist/1008945/7532898172cd9f03b4c0d0db145bc2440dcbb2f6/load.patch > /tmp/load.patch
rvm get head # always good to make sure you're up to date with RVM
rvm reload
rvm cleanup all
rvm install ruby-1.9.2-p180 --patch /tmp/load.patch -n patched
@HatemMahmoud
HatemMahmoud / Ubuntu rbenv
Created September 7, 2011 12:56
Installing Ruby 1.9.2 with OpenSSL on Ubuntu 11.04 using ruby-build and rbenv
# for more info: https://gist.github.com/1120938
@innotekservices
innotekservices / jquery.spin.js
Created October 16, 2011 02:39
jQuery Plugin for Spin.js
/*
You can now create a spinner using any of the variants below:
$("#el").spin(); // Produces default Spinner using the text color of #el.
$("#el").spin("small"); // Produces a 'small' Spinner using the text color of #el.
$("#el").spin("large", "white"); // Produces a 'large' Spinner in white (or any valid CSS color).
$("#el").spin({ ... }); // Produces a Spinner using your custom settings.
$("#el").spin(false); // Kills the spinner.
@kennethkalmer
kennethkalmer / find_unused_helpers.rb
Created November 29, 2011 07:17
Find unused helpers in a Rails app (slow)
#!/usr/bin/env ruby
#
# Shotgun approach (read: slow and dirty hack) to help find unused helpers in a Rails application
#
puts "Loading all source files into memory :("
source = {}
Dir["app/**/**/*.*"].each do |f|
source[ f ] = File.readlines( f )

Hi everyone,

It's time we had The Talk.

The tech world is currently managing its inclusion / exclusion / minorities problem. It's not always pretty. It's never pleasant, but it's necessary.

I've been dragged in an ugly troll around ParisRB. Full transparency is the only way to deal with this, so here it is. I know speed is key, as sad rumors are already spreading.

We'll have to set facts straight:

@chengyin
chengyin / linkedout.js
Last active July 11, 2021 15:23
Unsubscribe all LinkedIn email in "one click". For an easier to use version, you can check out the bookmarklet: http://chengyin.github.io/linkedin-unsubscribed/
// 1. Go to page https://www.linkedin.com/settings/email-frequency
// 2. You may need to login
// 3. Open JS console
// ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers))
// 4. Copy the following code in and execute
// 5. No more emails
//
// Bookmarklet version:
// http://chengyin.github.io/linkedin-unsubscribed/