Skip to content

Instantly share code, notes, and snippets.

Igor Soarez soarez

Block or report user

Report or block soarez

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
@luismreis
luismreis / texy-1.8.sh
Last active Jun 30, 2019
Install adafruit lcd drivers on texy's 1.8 tft display (raspberry pi)
View texy-1.8.sh
## Install kernel modules
mkdir -p ~/work/share/lcd/adafruit-pitft-2.8
cd ~/work/share/lcd/adafruit-pitft-2.8
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-bin-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-dev-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-doc-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi0-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/raspberrypi-bootloader-adafruit-20140724-1.deb
@dscape
dscape / books.txt
Last active Aug 29, 2015
Books for the YLD Office
View books.txt
Predictably Irrational: The Hidden Forces that Shape Our Decisions
Quiet: The power of introverts in a world that can't stop talking
Business Adventures
Zero to One
Beyond Budgeting
Winning Decisions: Getting It Right the First Time
Creativity Inc
Good to Great
Surviving & Thriving in a Relationship with an Entrepreneur
First, Break All the Rules
@luismreis
luismreis / install-texy-1.8.txt
Created Jul 29, 2014
Install texy's raspberry pi TFT 1.8 screen with current adafruit/notro drivers
View install-texy-1.8.txt
# https://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/software-installation
mkdir -p ~/work/share/adafruit-pitft-2.8
cd ~/work/share/adafruit-pitft-2.8
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-bin-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-dev-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi-doc-adafruit.deb
wget http://adafruit-download.s3.amazonaws.com/libraspberrypi0-adafruit.deb
View gist:9dec4195a88066fa42e6

% A Guide to Rust Syntax

A very brief guide to Rust syntax. It assumes you are already familiar with programming concepts.

Assert macro

The assert! macro ends the program if the condition passed to it is not true:

fn main() {
@kujohn
kujohn / portforwarding.md
Last active Oct 10, 2019
Port forwarding in Mavericks
View portforwarding.md

Port Forwarding in Mavericks


Since Mavericks stopped using the deprecated ipfw (as of Mountain Lion), we'll be using pf to allow port forwarding.

####1. anchor file Create an anchor file under /etc/pf.anchors/<anchor file> with your redirection rule like:

View clone_zone.md

Recipe for customizing a SmartoOS image and cloning it

1. Create base image

1.1. Download and install the base image:

[root@00-0c-29-aa-24-ba ~]# imgadm list
UUID                                  NAME             VERSION  OS       PUBLISHED
9eac5c0c-a941-11e2-a7dc-57a6b041988f  base64           13.1.0   smartos  2013-04-26T15:17:57Z
@soarez
soarez / pullall.sh
Last active Dec 17, 2015
update and link a folder of git versioned npm modules
View pullall.sh
#!/bin/bash
contents=`ls`
module_names=()
module_folders=()
npm_root=$(npm root -g)
do_pull=1
do_npm_install=1
do_npm_link=1
@TooTallNate
TooTallNate / endianness.js
Created Feb 10, 2013
Get host machine endianness using JavaScript Typed Arrays (polyfill for `os.endianness()` in node.js)
View endianness.js
function endianness () {
var b = new ArrayBuffer(4);
var a = new Uint32Array(b);
var c = new Uint8Array(b);
a[0] = 0xdeadbeef;
if (c[0] == 0xef) return 'LE';
if (c[0] == 0xde) return 'BE';
throw new Error('unknown endianness');
}
View jsmem.md

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...
@luismreis
luismreis / gist:4341562
Created Dec 19, 2012
share mac directory with rpi via nfs
View gist:4341562
ssh <sudoer>@<server>
sudo su -
mkdir -p <share-starting-at-/>
cat > /etc/exports <<EOF
# /path options clients
<share-starting-at-/> -network 192.168.1.0 -mask 255.255.255.0
EOF
You can’t perform that action at this time.