Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# http://wiki.ros.org/docker/Tutorials/GUI
# mount /etc/group and /etc/passwd read only
# set user from $USER
docker run -ti --rm -v $(pwd):/tmp/hx -w /tmp/hx -v /etc/group:/etc/group:ro -v /etc/passwd:/etc/passwd:ro —user=$USER debian:jessie
@jesstelford
jesstelford / netflix-rpi.md
Last active April 4, 2020 17:52
Netflix on Raspberry Pi (incomplete)

Note: as @clibois mentioned below, due to the DRM Netflix uses, all decoding has to be done in CPU, making it somewhat choppy.

Note 2: Even the RPi 3 suffers from these CPU limitations. There is the potentially risky option of overclocking your RPi 3, but I haven't tried this.

If you manage to get smooth playback, please contact me, or post your solution here

UPDATE: I can no longer get this method to work. I have tried using Chromium v47, and v48, and both result in Netflix error "Oops, something went wrong" / C7053-1807, for which I can find no description online. If you manage to get things up and running, please contact me!

OSMC

@ITler
ITler / download-springer.sh
Last active May 2, 2020 07:54
Parse free springer book CSV sheet and download titles
#! /bin/bash
# Input file should be based on downloadable Excel sheets, but saved as CSV file (field_delimiter=; string_delimiter=<empty>)
INPUT_FILE=${1}
INPUT_FILE_CONTENT_START_LINE=${2:-2}
URL_COLUMN_IDX=${3:-19}
assemble_download_file_basename() {
input_file="${1}"
url="${2}"
@alexcasalboni
alexcasalboni / 0-README.md
Last active December 11, 2020 22:41
AWS Lambda: Advanced Coding Session - clda.co/aws-lambda-webinar

AWS Lambda: Advanced Coding Session (slides)

Live demos:

  1. Amazon API Gateway Access Control
  2. Amazon Kinesis Streams processing
  3. Amazon Cognito Sync trigger
  4. AWS CloudFormation Custom Resources
@laurentperrinet
laurentperrinet / list_workspaces.py
Last active March 8, 2021 16:33
How can I list all existing workspaces in JupyterLab?
#!/usr/bin/env python3
"""
How can I list all existing workspaces in JupyterLab?
as answered @
https://stackoverflow.com/questions/52656747/how-can-i-list-all-existing-workspaces-in-jupyterlab/53011827#53011827
"""
import argparse
# construct the argument parse and parse the arguments
@hanshasselberg
hanshasselberg / dnsperf_install.sh
Last active August 18, 2021 09:25
Install dnsperf on ubuntu
sudo apt-get install -y bind9utils libbind-dev libkrb5-dev libssl-dev libcap-dev libxml2-dev
curl ftp://ftp.nominum.com/pub/nominum/dnsperf/2.0.0.0/dnsperf-src-2.0.0.0-1.tar.gz -O
tar xfvz dnsperf-src-2.0.0.0-1.tar.gz
cd dnsperf-src-2.0.0.0-1
./configure
make
sudo make install
@ambakshi
ambakshi / iam-assume-role.sh
Last active October 25, 2021 15:50
Assume an IAM role. An interesting way of doing IAM roles is to give the instance permissions to assume another role, but no actual permissions by default. I got this idea while setting up security monkey: http://securitymonkey.readthedocs.org/en/latest/quickstart1.html#setup-iam-roles.
#!/bin/bash
#
# Assume the given role, and print out a set of environment variables
# for use with aws cli.
#
# To use:
#
# $ eval $(./iam-assume-role.sh)
#
@JPvRiel
JPvRiel / ubunut_network_manager_docker_dns_workaround.md
Last active July 18, 2022 23:09
Ubuntu, NetworkManager and Docker DNS workaround

Docker issues are frequently logged for DNS resolution in containers because it doens't inhert or get values for DNS from NetworkManager which leverages a built in dnsmasq to inteligently manage DNS.

Perminant workarround

sudo bash -c "echo listen-address=$(ip -4 addr show dev docker0 | grep -oP '(?<=inet\s)\d+(\.\d+){3}') > /etc/NetworkManager/dnsmasq.d/docker-bridge"
sudo systemctl reload NetworkManager
sudo bash -c 'echo -e "{\n\t\"dns\": [\"$(ip -4 addr show dev docker0 | grep -oP "(?<=inet\s)\d+(\.\d+){3}")\"]\n}" > /etc/docker/daemon.json'
sudo systemctl restart docker
@ragusa87
ragusa87 / android-authenticator2-extract-qrcode.sh
Created May 27, 2015 21:36
Extract data from android backup of Google Authenticator 2 to qrcodes
#!/bin/bash
# Extract data from nandroid backup of Google Authenticator 2
# > /data/data/com.google.android.apps.authenticator2/databases/databases
# require: sqlite3 + qrencode
sqlite3 databases <<!
.headers off
.mode csv
.output codes.csv
select printf("otpauth://totp/%s?secret=%s&issuer=%s",email,secret,issuer) from accounts;