Skip to content

Instantly share code, notes, and snippets.

@Bouke
Bouke / gist:11261620
Last active March 4, 2025 11:36
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

@clasqui
clasqui / README.md
Last active October 14, 2017 01:49
Adafruit LCD text scroll function for Raspberry Pi

Adafruit LCD text scroll function for Raspberry Pi

This tiny function, written in python, allows you to easily scroll text of any length in the LCD 16x2 of Adafruit, which only allows 16 characters per row.

#Install And Use To use this function just download the file named ScrollLCD.py and in your code import it. It takes two obligatory parameters, lcd and text.

Example:

@nderkach
nderkach / read_mitmproxy_dumpfile.py
Last active March 23, 2025 19:19
Read a mitmproxy dump file and generate a curl command
#!/usr/bin/env python
#
# Simple script showing how to read a mitmproxy dump file
#
### UPD: this feature is now avaiable in mitmproxy: https://github.com/mitmproxy/mitmproxy/pull/619
from libmproxy import flow
import json, sys
@cmcginty
cmcginty / powershell-non-domain-remoting.md
Last active August 15, 2024 08:49
Windows Powershell Remoting into Non-Domain Joined System

Powershell Remoting to a Non-Domain Host

  1. From an admin shell, enable PS remoting on the machine you wish to access:
New-ItemProperty -Name LocalAccountTokenFilterPolicy `
  -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System `
  -PropertyType DWord -Value 1

Enable-PsRemoting -Force
@RichieChill
RichieChill / Kodi's Movie NFO File Template
Last active December 27, 2021 16:12
An example template for creating Kodi (XBMC) NFO files for movies. See http://kodi.wiki/view/NFO_files/movies for more information.
<?xml version="1.0" encoding="utf-8"?>
<movie>
<title></title>
<sorttitle></sorttitle>
<set></set>
<studio></studio>
<year></year>
<runtime></runtime>
<mpaa></mpaa>
@samba
samba / ubuntu-vnc-activate-remote.sh
Last active January 24, 2024 00:56
Activate VNC support in Ubuntu, from command-line (for active sessions)
#!/bin/sh
# This assumes you have access to the system via SSH already, and need
# remote VNC access as the same user, and you want only the primary display.
export DISPLAY=:0
# Encoded password with http://www.motobit.com/util/base64-decoder-encoder.asp
export VNC_PASSWORD="dm5jX3Bhc3N3b3JkNzE=" # vnc_password71
export VNC_PASSWORD="dm5jX3Bhc3M=" # vnc_password (a character limit is enforced?)
# Sadly many common VNC clients don't support encryption.
@bellbind
bellbind / Dockerfile
Last active August 27, 2024 12:32
[docker] ruby-1.8.7 with rails-2.3.18 image
# docker build -t ruby-1.8.7 .
# docker run -it --rm ruby-1.8.7
FROM ubuntu:16.04
WORKDIR /root
RUN apt update
RUN apt upgrade -y
RUN apt install -y ruby-build autoconf subversion bison
RUN apt install -y mecab mecab-ipadic-utf8 wget
@joeladdison
joeladdison / youtube-test.sh
Created January 16, 2017 08:40
Test stream for YouTube Live
#!/bin/sh
YT_SERVER="rtmp://a.rtmp.youtube.com/live2"
# Needs AUTH, which is the "Stream Name" from Ingestion Settings > Main Camera
# apt-get install --assume-yes gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools
# https://bugzilla.gnome.org/show_bug.cgi?id=731352#c6
@bouroo
bouroo / softether.sh
Last active May 12, 2025 03:54
Install softether vpn server on ubuntu 16.04+
#!/usr/bin/env bash
# SoftEther VPN Server Installer Script
# Register vultr.com with free credit https://www.vultr.com/?ref=9206731-8H
# Create VPS
# Tested on Ubuntu 18.04, Debian 10.0
# Instructions:
# 1. Save this file as softether-installer.sh
# 2. chmod +x softether-installer.sh
# 3. Run: ./softether-installer.sh or bash softether-installer.sh
# 4. Initialize VPN server config: /usr/local/vpnserver/vpncmd
@jackersson
jackersson / build-gstreamer.sh
Last active July 11, 2024 20:41
Build gstreamer from source
#!/bin/bash
# Set your target branch
BRANCH="1.14.2"
exec > >(tee build-gstreamer.log)
exec 2>&1
[ ! -d orc ] && git clone git://anongit.freedesktop.org/git/gstreamer/orc
[ ! -d gstreamer ] && git clone git://anongit.freedesktop.org/git/gstreamer/gstreamer