Skip to content

Instantly share code, notes, and snippets.

View roccogalluzzo's full-sized avatar
⛑️

Rocco Galluzzo roccogalluzzo

⛑️
View GitHub Profile
@PierreThiollent
PierreThiollent / Readme.md
Last active October 7, 2024 10:11
iTerm2 and Oh-my-zsh config

Setup iTerm2 and oh-my-zsh

Enjoy ! 😄

Install iTerm 2

Download iTerm2 here.

@Dr-Nikson
Dr-Nikson / README.md
Last active August 12, 2024 10:45
Auth example (react + redux + react-router)
@staltz
staltz / introrx.md
Last active November 20, 2024 15:03
The introduction to Reactive Programming you've been missing
@dnlserrano
dnlserrano / api_controller.rb
Last active January 19, 2021 09:56
Custom Authentication Controllers
class ApiController < ApplicationController
# define which model will act as token authenticatable
acts_as_token_authentication_handler_for Login
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :null_session
respond_to :json
skip_before_filter :verify_authenticity_token, if: :json_request?
@tadast
tadast / ssl_puma.sh
Last active January 29, 2024 04:41 — forked from trcarden/gist:3295935
localhost SSL with puma
# 1) Create your private key (any password will do, we remove it below)
$ cd ~/.ssh
$ openssl genrsa -des3 -out server.orig.key 2048
# 2) Remove the password
$ openssl rsa -in server.orig.key -out server.key
@larrybotha
larrybotha / A.markdown
Last active March 3, 2021 10:41
Custom social sharing icons
@riccardoscalco
riccardoscalco / README.md
Last active April 1, 2020 14:02
Topojson of Italy (province)
@josiahcarlson
josiahcarlson / prefix_code.py
Created May 6, 2013 16:29
Encode/decode sequences of integers to offer the ability to easily compare encoded sequences of integers as though they were decoded (which can be used to implement array comparisons in a database that doesn't offer native arrays).
'''
prefix_code.py
Copyright 2012-2013 Josiah Carlson
Released under the GNU LGPL v 2.1 license
This module offers the ability to encode/decode a sequence of integers into
strings that can then be used to compare sequences of integers (or paths on
trees) quickly. This module was originally intended to be used in a case-
preserving index in a relational database (where 'Z' comes before 'a', as is
@jonathanmoore
jonathanmoore / gist:2640302
Created May 8, 2012 23:17
Get the share counts from various APIs

Share Counts

I have always struggled with getting all the various share buttons from Facebook, Twitter, Google Plus, Pinterest, etc to align correctly and to not look like a tacky explosion of buttons. Seeing a number of sites rolling their own share buttons with counts, for example The Next Web I decided to look into the various APIs on how to simply return the share count.

If you want to roll up all of these into a single jQuery plugin check out Sharrre

Many of these API calls and methods are undocumented, so anticipate that they will change in the future. Also, if you are planning on rolling these out across a site I would recommend creating a simple endpoint that periodically caches results from all of the APIs so that you are not overloading the services will requests.

Twitter