This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!python3 | |
import requests | |
import json | |
import pprint | |
import csv | |
def create_work_packages(subjects): | |
resp = requests.get('http://openproject.cohda.wireless/api/v3/work_packages/available_projects', | |
headers = {'Content-type':'application/json'}, | |
auth= ('apikey', 'cdd4fb6c5f9df675e866f5b743e249d8bd286e6dd2a2ef4fa21f51e1a04643cb')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
systemd-analyze plot > something.svg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Hardware (watchdog) reset - same as power cycle | |
echo -ne '\xb5\x62\x06\x04\x04\x00\x00\x00\x00\x00\x0e\x64' > $DEVICES | |
# Clear msg and inf settings saved in u-blox | |
echo -ne '\xb5\x62\x06\x09\x0c\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x21\xd7' > $DEVICES |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dump tx | |
sudo tcpdump -npi cw-mon-tx -s0 -w /mnt/ubi/test_tx.pcap & | |
# Dump received TCI messages | |
sudo tcpdump -n udp dst portrange 13001 -vv -w | |
tcpdump -npi eth0 -vv -w /mnt/src/tci-$(date +%s).pcap udp dst portrange 13001 & | |
tcpdump -npi cw-mon-tx -vv -w /mnt/src/tx-$(date +%s).pcap & |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
svn mergeinfo --show-revs eligible $SOURCE $DISTINATION | xargs -i svn log $SOURCE -r '{}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sudo sh -c "echo 2560 > /proc/sys/fs/inotify/max_user_instances" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run me as | |
# ARCH=arm CROSS_COMPILE=~/buildroot-2016.05/output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi- make | |
# If KERNELRELEASE is defined, we've been invoked from the | |
# kernel build system and can use its language. | |
ifneq ($(KERNELRELEASE),) | |
obj-m := kobject.o | |
# Otherwise we were called directly from the command | |
# line; invoke the kernel build system. | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find ./path/to/directory/ -type f -print0 | xargs -0 sha1sum | |
# from http://superuser.com/questions/458326/sha1sum-for-a-directory-of-directories |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
qa | |
:%s/</</eg // e is to skip 'text not found' | |
:%s/>/>/eg | |
:%s/"/"/eg | |
:%s/&/&/eg | |
:%s/<<\(.*\)>\(.*\)<.*>>/<\2>/eg | |
q | |
// To replay on one file | |
@@a |
NewerOlder