Skip to content

Instantly share code, notes, and snippets.

@DusanMadar
DusanMadar / TorPrivoxyPython.md
Last active October 10, 2025 04:58
A step-by-step guide how to use Python with Tor and Privoxy

A step-by-step guide how to use Python with Tor and Privoxy

Latest revision: 2025-07-24.

Tested on Ubuntu 24.04 Docker container. The Dockerfile is a single line FROM ubuntu:24.04. Alternatively, you can simply run docker run -it ubuntu:24.04 bash.

NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>) after each failed service <service name> stop to kill it.

References

@mrhampson
mrhampson / convertMovToMp4.sh
Last active July 11, 2025 18:02
Convert a mac screencapture .mov to a compressed mp4
#!/bin/bash
usage="$(basename "$0") [-h] [-i] -- program that uses ffmpeg to convert mac screencapture .mov to a compressed mp4 for sharing
where:
-h show this help text
-i (required) the mov file to convert to mp4
dependencies:
Requires ffmpeg to be installed and available in the user's PATH.
@mickey-happygolucky
mickey-happygolucky / led.py
Created May 27, 2017 05:18
HTTP server with python
import RPi.GPIO as GPIO
class Led:
def __init__(self, pin):
self.pin = pin
self.s = 0
GPIO.setmode(GPIO.BOARD)
GPIO.setup(self.pin, GPIO.OUT)
@0xjac
0xjac / private_fork.md
Last active October 25, 2025 17:58
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@JoshCheek
JoshCheek / rails_sib.rb
Last active February 1, 2018 16:57
Rails app in 1 file, running with Seeing Is Believing
gem 'rails', '4.2.1' # prob works on others, too, but this is the one I figured it out on
require "rails"
require 'active_record'
require 'action_controller/railtie'
require 'action_view/railtie'
# ===== Configuration =====
Rails.logger = ActiveRecord::Base.logger = Logger.new $stdout
ActiveSupport::LogSubscriber.colorize_logging = false
@robzedgames
robzedgames / Traffic Light
Created August 1, 2012 21:13
Ruby and Arduino interaction using Sinatra & serialport
require 'sinatra'
require 'serialport'
configure do
$mode = 3
$serial_port = SerialPort.new("/dev/tty.usbserial-A800eJVv", 9600, 8, 1, SerialPort::NONE)
end
get '/' do
erb :index