Skip to content

Instantly share code, notes, and snippets.

@julionc
julionc / keybase.md
Created December 10, 2014 15:54
GitHub identity

Keybase proof

I hereby claim:

  • I am julionc on github.
  • I am julionc (https://keybase.io/julionc) on keybase.
  • I have a public key whose fingerprint is C521 522A 7ED2 E37F F3B4 40E5 26B3 1D45 7BFD 4016

To claim this, I am signing this object:

@julionc
julionc / 95147.user.js
Created August 17, 2011 20:32
Add MafiaWars Links to Facebook Profiles
// ==UserScript==
// @name Add MafiaWars Links to Facebook Profiles
// @copyright 2011 - Julio Napuri
// @version 1.0
// @description Adds MafiaWars specific links to the standard Facebook profile menu.
// @license GPL version 3 or any later version; http://www.gnu.org/copyleft/gpl.html
// @include http://*.facebook.com/*
// @include http://*.facebook.com/*#*
// @exclude http://apps.facebook.com/*
// @exclude http://apps.facebook.com/inthemafia
@julionc
julionc / ubuntu_install.sh
Created August 29, 2011 20:51
Things to do after install Ubuntu 11.4 (Natty)
#!/usr/bin/env bash
# Things to do after install Ubuntu 11.4 (Natty)
# Enabled partner repo
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
STOP="deb "
REPO="partner"
sudo sed -i "/^# $STOP.*$REPO/ s/^# //" /etc/apt/sources.list
# Repos
@julionc
julionc / MY_Controller.php
Created February 8, 2012 05:11
[es] Ejemplo de MY_Controller.php usando ion_auth como librería de Auth
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Admin_Controller extends CI_Controller {
protected $the_user;
public function __construct() {
parent::__construct();
@julionc
julionc / time.php
Created July 13, 2012 17:25
Simple script for basic measuring time - PHP
<?php
/*
* Simple script for basic measuring time
*
* See: https://groups.google.com/d/topic/phpperu/UAoqzKt2Cdc/discussion
*/
$before = microtime(true);
for ($i=0 ; $i < 1000000; $i++) {
@julionc
julionc / gist:4158704
Created November 28, 2012 02:42
Redirect to Www for Heroku With SSL
# Taken from http://blog.bigbinary.com/2012/10/12/redirect-to-www-heroku-ssl.html
Bigbinary::Application.routes.draw do
constraints(:host => /^bigbinary.com/) do
root :to => redirect("http://www.bigbinary.com")
match '/*path', :to => redirect {|params| "http://www.bigbinary.com/#{params[:path]}"}
end
end
@julionc
julionc / ruby_setup.md
Last active August 18, 2017 15:24
Deploy Ruby On Rails on Ubuntu 14.04

Deploy Ruby On Rails on Ubuntu 14.04

Server: Nginx with Phusion Passenger

Ruby Version: 2.1.3

User System: deploy

User System

@julionc
julionc / archlinux_install.sh
Last active February 12, 2018 19:03
Things to do after install ArchLinux (2012.12.01)
#!/usr/bin/env bash
# Things to do after install ArchLinux (2012.12.01)
pacman --noconfirm -S sudo
# Enabled archlinuxfr repo
arch=$(uname -m)
sudo cp /etc/pacman.conf /etc/pacman.conf.bak
echo "" >> /etc/pacman.conf
echo "[archlinuxfr]" >> /etc/pacman.conf
@julionc
julionc / slideshare-dl.py
Created September 17, 2011 16:11
slideshare-dl is a small command-line program for downloading slides from SlideShare.net
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
slideshare-dl.py
~~~~~~~~~~~~~~~~
slideshare-dl is a small command-line program
for downloading slides from SlideShare.net
@julionc
julionc / 00.howto_install_phantomjs.md
Last active February 21, 2024 11:01
How to install PhantomJS on Debian/Ubuntu

How to install PhantomJS on Ubuntu

Version: 1.9.8

Platform: x86_64

First, install or update to the latest system software.

sudo apt-get update
sudo apt-get install build-essential chrpath libssl-dev libxft-dev