Skip to content

Instantly share code, notes, and snippets.

@hernan604
hernan604 / multiple_ssh_setting.md
Created January 7, 2016 22:14 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl -L https://npmjs.org/install.sh | sh
@hernan604
hernan604 / chat.pl
Last active August 29, 2015 14:15 — forked from jberger/chat.pl
#!/usr/bin/env perl
use Mojolicious::Lite;
use Mojo::Redis2;
use experimental 'signatures';
helper redis => sub { state $r = Mojo::Redis2->new };
get '/' => 'chat';
use Mojo::Base -strict;
use Devel::Cycle;
use Mojo::UserAgent;
use Promises 'deferred';
my $ua = Mojo::UserAgent->new;
sub fetch_it {
my $url = shift;
my $d = deferred();
@hernan604
hernan604 / player.pl
Last active August 29, 2015 14:08 — forked from jberger/player.pl
# MY MODIFIED PLAYER
# ** * * DOESNT WORK ON FIREFOX * * * ONLY ON CHROME * * *
# must install AudioFile::Plugins in order to work: cpanm AudioFile::Info::MP3::Info
#!/usr/bin/env perl
use strict;
use warnings;
use Mojolicious::Lite;
use AudioFile::Find;
use AudioFile::Info;
use File::Spec;
#
# Tested on OS X 10.9.2 (MacBook Air) with Perl 5.18.2 and EV 4.17 (kqueue)
#
# 280.9MB memory usage, 0% CPU usage once roundtrips are finished after 29s
# (with all 10k sockets still open)
#
# Get the latest version of Mojolicious from http://github.com/kraih/mojo
# $ sudo sysctl -w kern.maxfiles=40960 kern.maxfilesperproc=20480
# $ ulimit -n 20480
# $ LIBEV_FLAGS=8 perl c10k_client.pl
#!/usr/bin/perl
use Mysql;
use strict;
use vars qw($school_name);
use vars qw($pass);
require "./cgi-lib.pl";