Skip to content

Instantly share code, notes, and snippets.

@s0ftice
s0ftice / zerotier-moon
Created May 6, 2020 14:13
How-to setup a zerotier moon for the Parrot Disco/Bebop 2 UAVPAL 4G/LTE softmod
### SERVER SETUP @ Home/Cloud Linux Server (here Debian 9)
echo "deb http://download.zerotier.com/debian/stretch stretch main" | sudo tee /etc/apt/sources.list.d/zerotier.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1657198823E52A61
sudo apt-get update
sudo apt-get install zerotier-one
sudo zerotier-idtool initmoon /var/lib/zerotier-one/identity.public >moon.json
nano -w moon.json
# change the line
"stableEndpoints": []
@bcantoni
bcantoni / pricecharting.py
Created January 23, 2020 00:23
Barcode scanning used video games
#!/usr/bin/env python
'''
By just doing a HEAD operation, we can look at the location returned and extract game system and title:
$ curl -i --head "https://www.pricecharting.com/search-products?type=videogames&q=096427015055"
HTTP/2 307
content-type: text/html; charset=utf-8
location: https://www.pricecharting.com/game/nintendo-ds/cooking-mama-2-dinner-with-friends?q=096427015055
x-appengine-log-flush-count: 0
x-cloud-trace-context: 95201b263e270f913954a519333070f4
@maxwelleite
maxwelleite / ttf-wine-tahoma-installer.sh
Last active October 16, 2023 13:15
Script to install the latest Wine Tahoma fonts on Ubuntu distros
#!/bin/bash
# Author: Maxwel Leite
# Website: http://needforbits.wordpress.com/
# Description: Script to install the latest Wine Tahoma Regular and Wine Tahoma Bold fonts on Ubuntu distros from the Wine Project.
# The Wine project includes the free and open-source fonts Wine Tahoma Regular and Wine Tahoma Bold released under LGPL
# designed to have identical metrics to the Microsoft Tahoma font. This was done because Tahoma is available by default
# on Windows, and many applications expect the font to be available.
# Dependencies: wget
# Tested: Ubuntu Saucy/Trusty/Xenial/Bionic
# Latest Update: 20/11/2020
@nobuh
nobuh / readdir.js
Created September 14, 2011 06:58
readdir - node.js readdir sample
var fs = require('fs');
fs.readdir( process.argv[2], function (err, files) {
if (!err)
console.log(files);
else
throw err;
});
console.log("Fired callback.");
@swaroopch
swaroopch / flask-boilerplate-tmux.bash
Created December 5, 2010 07:00
A command that scripts a tmux session
#!/bin/bash
function flask-boilerplate-tmux
{
# https://github.com/swaroopch/flask-boilerplate
BASE="$HOME/code/flask-boilerplate"
cd $BASE
tmux start-server
tmux new-session -d -s flaskboilerplate -n model