Skip to content

Instantly share code, notes, and snippets.

@claudyus
claudyus / PKGBUILD
Created September 15, 2017 17:10 — forked from jck/PKGBUILD
msp430mcu
# Contributor: Rick W. Chen <stuffcorpse at archlinux dot us>
pkgname=msp430mcu
pkgver=20120406
pkgrel=2
pkgdesc="C headers and binutils linker scripts for microcontrollers in the MSP430 family"
arch=(any)
url="http://mspgcc4.sourceforge.net/"
license=('GPL')
makedepends=('python2')
'''
A python script to generate TOP/BOTTOM file for hobbyist project from a kicad PCB
This script is based on:
https://github.com/KiCad/kicad-source-mirror/blob/0cab3e47ad8097db7b898b3cef2cf9b235318ca3/demos/python_scripts_examples/plot_board.py
'''
import sys
import getopt
USER=ubuntu
GROUP=ubuntu
sudo mkdir -p /opt/{dev,git} || exit 0
sudo chown -R $USER:$GROUP /opt/{dev,git}
git clone git://github.com/json-c/json-c.git /opt/git/json-c
cd /opt/git/json-c/
autoreconf -i
@claudyus
claudyus / test-contiki.sh
Last active August 29, 2015 14:08
contiki-rpl-testcase
#!/bin/bash
set -x
#return 0 if border router is working (curl works)
#Init USB-RLY02
sudo chmod 777 /dev/ttyACM0
stty -F /dev/ttyACM0 raw ispeed 15200 ospeed 15200 cs8 -ignpar -cstopb -echo
echo 'n' > /dev/ttyACM0 # ALL relay OFF
@claudyus
claudyus / gist:89e59ac1d0199bc20508
Created October 2, 2014 15:11
jenkins openwrt build
#feeds
cp feeds.conf.default feeds.conf
echo "src-git openwisp https://github.com/openwisp/openwrt-feed.git" >> feeds.conf
./scripts/feeds update
./scripts/feeds install -d y openwisp-fw
#config target
echo "CONFIG_TARGET_ar71xx=y" > .config
make defconfig
make -j 4
@claudyus
claudyus / lxc-host.sh
Created September 15, 2014 19:31
LXC name in hostsfile
#!/bin/bash
sed -i '/^#LXC$/,/^#END LXC$/d' /etc/hosts
echo "#LXC" >> /etc/hosts
lxc-ls -1 --fancy -F ipv4,name | grep -o ^[0-9].* >> /etc/hosts
echo "#END LXC" >> /etc/hosts
sudo pip install libpq-dev
pip install psycopg2 lxml pyyaml python-dateutil babel pil simplejson unittest2 psutil werkzeug reportlab mako jinja2 docutils python-openid
pip install -e bzr+http://download.gna.org/pychart/bzr-archive#egg=pychart
@claudyus
claudyus / gist:6712150
Last active December 23, 2015 23:49
pg secret
SELECT p.proname AS name,
p.oid,
p.proargtypes AS args,
ds.description ,
p.prorettype AS rettype,
p.proretset,
p.probin,
p.proisstrict AS strict,
p.prosrc AS body,
l.lanname AS lang,
@claudyus
claudyus / gist:6209577
Created August 12, 2013 09:50
my sublime config
[
{ "keys": ["ctrl+q"], "command": "exit" },
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
{ "keys": ["ctrl+o"], "command": "prompt_open_file" },
{ "keys": ["ctrl+shift+t"], "command": "reopen_last_file" },
{ "keys": ["alt+o"], "command": "switch_file", "args": {"extensions": ["cpp", "cxx", "cc", "c", "hpp", "hxx", "h", "ipp", "inl", "m", "mm"]} },
{ "keys": ["ctrl+n"], "command": "new_file" },
{ "keys": ["ctrl+s"], "command": "save_all" },