Skip to content

Instantly share code, notes, and snippets.

- firefox
- 1password
- Iterm2
- menumeters
- dropbox
- homebrew
- slack
- fish shell https://gist.github.com/vallettea/7f48aedfabc501bfe723
- vim https://gist.github.com/vallettea/f551d2a0721ca403285f
- sublime text3
@vallettea
vallettea / config.fish
Created December 8, 2015 10:55
My ~/.config/fish/config.fish
########## autojump
begin
set --local AUTOJUMP_PATH $HOME/.autojump/share/autojump/autojump.fish
if test -e $AUTOJUMP_PATH
source $AUTOJUMP_PATH
end
end
########## docker
@vallettea
vallettea / github.sh
Created November 25, 2015 09:28
setup git for github
git config --global user.name "vallettea"
git config --global user.email "vallettea@gmail.com"
ssh-keygen -t rsa -b 4096 -C "vallettea@gmail.com"
eval ssh-agent $SHELL
ssh-add ~/.ssh/id_rsa
# cat ~/.ssh/id_rsa.pub and add it to github
ssh -T git@github.com
@vallettea
vallettea / sshfs.md
Last active November 24, 2015 10:55
to sync a remote host to be able to code on rpi or servers
#!/usr/bin/env python
import RPi.GPIO as GPIO, time, os
GPIO.setmode(GPIO.BCM)
class PINS:
SPICLK = 11
SPIMISO = 9
SPIMOSI = 10
SPICS = 8
@vallettea
vallettea / laser_pratices.md
Created October 22, 2015 07:36
Some good practices for laser cutting

Building the vector file

  • your file should be in RGB
  • the width of the lines should be 0.001 pts
  • black for engraving
  • red for inside cuts
  • blue for oustide cuts
  • leave 5mm arround the global drawing
@vallettea
vallettea / mcp3002.js
Created October 15, 2015 10:20 — forked from 4rzael/mcp3002.js
A litlle example code to read data from a MCP3002 on a RPi using pi-spi
'use strict';
var SPI = require('pi-spi');
var spi = SPI.initialize("/dev/spidev0.0");
// Read value from a MCP3002 (http://ww1.microchip.com/downloads/en/DeviceDoc/21294C.pdf)
function readMCP(channel, callback) {
if (spi === undefined) return;
var mode = (8 + channel) << 4;
@vallettea
vallettea / ssh_port_forwarding.md
Created October 14, 2015 10:13
For osx user that want to access their docker hosted services from other devices

Start by turning off your dicer serv:

docker-machine stop

then to bind port 3500 inside docker machine to 3500 on your computer, use

VBoxManage modifyvm default --natpf1 "tcp-port3500,tcp,,3500,,3500";
brew uninstall docker
brew uninstall boot2docker
https://raw.githubusercontent.com/boot2docker/osx-installer/master/uninstall.sh
https://www.docker.com/toolbox
export DOCKER_HOST=tcp://192.168.99.100:2376
export DOCKER_MACHINE_NAME=default
export DOCKER_TLS_VERIFY=1
@vallettea
vallettea / gist:e43ba92059f3b4242beb
Created September 17, 2015 16:51
blutooth on arch linux
pacman -Syy
pacman -Sy bluez bluez-utils
pacman -Sy libbluetooth-dev
modprobe btusb
systemctl enable bluetooth.service
systemctl start bluetooth.service
bluetoothctl