Skip to content

Instantly share code, notes, and snippets.

Avatar

Pedro Carriço pedrocarrico

View GitHub Profile
@pedrocarrico
pedrocarrico / interfaces
Created Jun 30, 2014
Raspbian network interfaces configuration ("/etc/network/interfaces")
View interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-ssid "SSID"
@pedrocarrico
pedrocarrico / install.sh
Created Jun 30, 2014
Install latest node.js on the raspberry pi
View install.sh
!#/bin/bash
wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb
View symbolize_keys.rb
module HashExtensions
def symbolize_keys
inject({}) do |acc, (k,v)|
key = String === k ? k.to_sym : k
value = Hash === v ? v.symbolize_keys : v
acc[key] = value
acc
end
end
end
@pedrocarrico
pedrocarrico / wpa_supplicant.conf
Created Nov 17, 2012
Wpa supplicant configuration
View wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1
network={
ssid="YOUR SSID here"
scan_ssid=1
mode=0
proto=WPA2
auth_alg=OPEN
@pedrocarrico
pedrocarrico / README.md
Last active Aug 5, 2016
pg-copy-streams readable stream not finishing and multiple end events error example
View README.md
@pedrocarrico
pedrocarrico / install_ruby_rpi.sh
Last active Mar 22, 2017 — forked from blacktm/install_ruby_rpi.sh
A Bash script to install Ruby 2.2 on the Raspberry Pi (Raspbian).
View install_ruby_rpi.sh
#!/bin/bash
# -----------------------------------------------------------------------
# Installs Ruby 2.2 using rbenv/ruby-build on the Raspberry Pi (Raspbian)
#
# Run from the web:
# bash <(curl -s raw_script_url_here)
# -----------------------------------------------------------------------
# Set up variables
@pedrocarrico
pedrocarrico / remove_packages.sh
Last active Oct 26, 2017
Remove unneeded packages from raspbian
View remove_packages.sh
#!/bin/bash
# Stephen's Raspberry Pi Mimimalist install from standard Raspdian Image
# as seen in http://www.raspberrypi.org/phpBB3/viewtopic.php?f=24&t=45437
sudo apt-get update
sudo apt-get purge xserver* -y
sudo apt-get purge ^x11 -y
sudo apt-get purge ^libx -y
sudo apt-get purge ^lx -y
sudo apt-get purge samba* -y
sudo apt-get autoremove -y
@pedrocarrico
pedrocarrico / haproxy.cfg
Created Jun 16, 2012
Sample HAProxy configuration for testing in your local development environment
View haproxy.cfg
global
maxconn 4096
pidfile /tmp/haproxy-queue.pid
defaults
log global
mode http
timeout connect 300000
timeout client 300000
timeout server 300000
View lambda2img.Dockerfile
ARG FUNCTION_RUNTIME
FROM mikesir87/aws-cli as code
ARG FUNCTION_NAME
ARG AWS_DEFAULT_REGION
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
RUN wget -O function.zip `aws lambda get-function --function-name $FUNCTION_NAME --query 'Code.Location' --output text`
@pedrocarrico
pedrocarrico / install.sh
Created Oct 30, 2019
Install nano on heroku dyno
View install.sh
mkdir /app/nano
curl https://github.com/Ehryk/heroku-nano/raw/master/heroku-nano-2.5.1/nano.tar.gz --location --silent | tar xz -C /app/nano
export PATH=$PATH:/app/nano
You can’t perform that action at this time.