Skip to content

Instantly share code, notes, and snippets.

🙃
¯\_(ツ)_/¯

Miguel miguelfrde

🙃
¯\_(ツ)_/¯
Block or report user

Report or block miguelfrde

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am miguelfrde on github.
  • I am miguelfrde (https://keybase.io/miguelfrde) on keybase.
  • I have a public key ASDTyQNjIN6EunJlqu73C7qGjxeHCPWLBNskeI1hOqip_Qo

To claim this, I am signing this object:

View kubernetes-aws.sh
sudo apt-get update
sudo apt-get install -y python-pip
sudo pip install awscli
aws configure # enter credentials for a user with full s3,ec2 access / admin access
export KUBERNETES_PROVIDER=aws
export KUBE_AWS_ZONE=us-west-2a
export KUBE_AWS_INSTANCE_PREFIX=k8s
export KUBE_MINION_IMAGE=ami-9abea4fb # Ubuntu server 14.04
@miguelfrde
miguelfrde / rpi-static-ip.txt
Last active Mar 1, 2016
Raspberry Pi static IP wlan
View rpi-static-ip.txt
###########################
# /etc/network/interfaces #
###########################
source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
iface eth0 inet dhcp
View self_signed_ssl.sh
openssl genrsa -des3 -out ssl.key 2048
openssl req -new -key ssl.key -out ssl.csr
cp ssl.key ssl.key.orig
openssl rsa -in ssl.key.orig -out ssl.key
openssl x509 -req -days 1095 -in ssl.csr -signkey ssl.key -out ssl.crt
cat ssl.crt ssl.key > ssl.pem
@miguelfrde
miguelfrde / initheroku.sh
Created Jul 10, 2014
Heroku Toolbelt setup
View initheroku.sh
# Requirements:
# OSX: brew install heroku-toolbelt
# Arch Linux: wget -qO- https://toolbelt.heroku.com/install.sh | sh
# pacman -S openssh
# # Add /usr/local/heroku/bin to PATH
ssh-keygen -t rsa
heroku login
heroku keys:add
@miguelfrde
miguelfrde / archinstall.md
Last active Nov 7, 2019
Preinstalled Windows 8.1 and Arch Linux dual boot
View archinstall.md

Arch Linux installation (preinstalled Windows 8.1 dual boot)

Before

  1. Disable Windows Fast-Startup
  2. Disable Secure Boot

Partitioning

View media.css
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
View power-set.py
def power_set(lst):
result = [[]]
for x in lst:
result += [subset + [x] for subset in result]
return result
def power_set_one_line(lst):
return reduce(lambda r, x: [s + x for s in r], lst, [[]])
@miguelfrde
miguelfrde / binary.b
Last active Jan 4, 2016
Brainfuck program to generate next binary number
View binary.b
- initial mark (FF)
read input 49 = 1 and 48 = 0 (q0)
>>,[>,<-------- -------- -------- -------- -------- -------- >]
- final mark (FF)
<[-<] change ones for zeros until a zero is found (q1)
+ change zero for one (q1 to q2)
< ignore all characters until FF is found (q2)
+ increase by one (ensures that the data pointer moves until FF is found)
[ if the byte at the data pointer is zero then FF was found
- it wasn't zero decrease it
You can’t perform that action at this time.