Skip to content

Instantly share code, notes, and snippets.

View icarrr's full-sized avatar
🚴
Cycling anywhere and Work from everywhere

Faizar Septiawan icarrr

🚴
Cycling anywhere and Work from everywhere
View GitHub Profile
@maciakl
maciakl / gist:4531580
Last active April 20, 2021 11:17
Adding Ubuntu PPA repository behind a firewall. When you are behind a corporate firewall that only allows outbound traffic on ports 80 and 433 the usual apt-add-repository command will not work. To get around it. Here is the workaround.
# trying to install PPA behind firewall fails:
$ sudo add-apt-repository ppa:chris-lea/node.js
gpg: requesting key C7917B12 from hkp server keyserver.ubuntu.com
gpgkeys: HTTP fetch error 7: couldn't connect to host
gpg: no valid OpenPGP data found.
gpg: Total number processed: 0
recv failed
# this is how you get around it (use the key from the command above)
$ sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys C7917B12
@earthgecko
earthgecko / bash.generate.random.alphanumeric.string.sh
Last active April 2, 2024 15:59
shell/bash generate random alphanumeric string
#!/bin/bash
# bash generate random alphanumeric string
#
# bash generate random 32 character alphanumeric string (upper and lowercase) and
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)
# bash generate random 32 character alphanumeric string (lowercase only)
cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
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"