Skip to content

Instantly share code, notes, and snippets.

[
{
"name": "SofleKeyboard",
"author": "Josef Adamcik",
"switchMount": "cherry"
},
[
{
"y": 0.2,
"x": 3,
@ChrisWeiss
ChrisWeiss / readme.md
Last active January 22, 2020 02:02
RTLAMR systemctl setup/files for raspberry pi.

Basic steps to get the server up and running on a Raspberry Pi with 2019-09-26-raspbian-buster-lite

Install OS, go through raspi-setup and set password, hostname, locale, time-zone, etc. Update all the things:

$ sudo apt-get update && sudo apt-get upgrade -y

Install Git and GoLang

$ sudo apt-get install git golang rtl-sdr

@ChrisWeiss
ChrisWeiss / create-database.txt
Created January 14, 2020 17:30 — forked from brettkromkamp/create-database.txt
Setting up the TopicDB database
sudo -i -u postgres
psql
CREATE USER databasuser WITH PASSWORD 'password';
CREATE DATABASE databasename OWNER databasuser;
\q
psql -h localhost -U databasuser -d databasename -a -f topicmap-definition.sql
exit
@ChrisWeiss
ChrisWeiss / export_google_music.js
Created July 30, 2019 15:21 — forked from jmiserez/export_google_music.js
(fixed/updated 2016-05-10) Export your Google Music Library and Playlists (Google Play Music All Access) (see http://webapps.stackexchange.com/questions/50311/print-playlist-from-google-play-music for more)
// Copyright 2016 Jeremie Miserez <jeremie@miserez.org>
//
// MIT License
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF O
git clone --bare git@github.com:ChrisWeiss/dotfiles.git $HOME/.cfg
function config {
/usr/bin/git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout
if [ $? = 0 ]; then
echo "Checked out config.";
else
echo "Backing up pre-existing dot files.";
@ChrisWeiss
ChrisWeiss / humble_download.py
Created November 10, 2017 01:11
Script to download books purchased in a Humble Bundle. From http://paste.openstack.org/show/625665/
#!/usr/bin/python3 -ttu
# vim: ai ts=4 sts=4 et sw=4
import os
import sys
import urllib.parse
import bs4
import requests
javascript: function runDownloadThing(howManyToDownload) {
if (!howManyToDownload) {
howManyToDownload = 3;
}
if (window['downloadSome']) {
window.downloadSome();
return;
}
var iter = $('div.download a.a:not([download])').toArray();
iter = iter.concat($('div.row a[download]').toArray());
@ChrisWeiss
ChrisWeiss / chroot.txt
Created March 10, 2017 22:07
Creating containers by hand (the hard way)
# List the contents of the current directory
root@host:/# ls
bin dev home lib lost+found mnt proc run srv tmp vagrant vmlinuz
boot etc initrd.img lib64 media opt root sbin sys usr var
# Bind mount 'dev' and 'proc' filesystems from the host
root@host:/# TARGET="/var/some-chroot"
root@host:/# mkdir -p ${TARGET}/{dev,proc,bin,lib,lib64}
root@host:/# mount --bind /dev ${TARGET}/dev
root@host:/# mount --bind /proc ${TARGET}/proc

Keybase proof

I hereby claim:

  • I am chrisweiss on github.
  • I am chrisweiss (https://keybase.io/chrisweiss) on keybase.
  • I have a public key whose fingerprint is 79A2 0A1F 14CF 74AF 4225 E070 2050 D44C DB84 EB58

To claim this, I am signing this object: