Skip to content

Instantly share code, notes, and snippets.

View odyssey4me's full-sized avatar

Jesse Pretorius odyssey4me

  • Red Hat
  • United Kingdom
View GitHub Profile
@sourcec0de
sourcec0de / PrivateTorrent.md
Last active September 1, 2022 09:04
Host a private torrent tracker, and seed a torrent on ubuntu 12.10

Install dep, and start tracker

sudo apt-get install bittornado ctorrent
bttrack --port 6969 --dfile ~/.bttrack/dstate --logfile ~/.bttrack/tracker.log --nat_check 0 --scrape_allowed full

Now, create a torrent file

ctorrent -t -u "YOUR_SERVER_IP:6969/announce" -s new_file_name.torrent file_or_folder_for_torrent
@dctrwatson
dctrwatson / nginx.conf
Last active April 28, 2024 10:26
Caching PyPi packages locally with nginx
user www-data;
worker_processes 4;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
@cloudnull
cloudnull / openstack-Fixerator.py
Last active August 29, 2015 13:57
This is a tool, you should use it.
#!/usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@mattyb149
mattyb149 / zklist.groovy
Last active February 4, 2023 06:24
Recursively list Zookeeper nodes and data
@Grab('org.apache.zookeeper:zookeeper:3.4.6')
import org.apache.zookeeper.*
import org.apache.zookeeper.data.*
import org.apache.zookeeper.AsyncCallback.StatCallback
import static org.apache.zookeeper.ZooKeeper.States.*
final int TIMEOUT_MSEC = 5000
final int RETRY_MSEC = 100
@carlhoerberg
carlhoerberg / instructions.md
Last active January 7, 2017 22:06
How to see Netflix on a Chromecast abroad by tethering and redirecting all DNS traffic in OS X

Chromecast always uses Google's DNS servers so you can't just change DNS server on your local network, you have to redirect all DNS requests to another server. This guide will help you do so with a OS X computer and a phone.

Requirements for this guide:

  • Phone with tethering
  • OS X >=10.9
  • unblock-us.com or another DNS resolver

Steps:

  1. Tethering your computer through your phone, eg. connect to your wifi, and tether with USB.
su - nginx
# Change to the repo build directory
cd repo-build
# Clone the repo
git clone https://github.com/stackforge/os-ansible-deployment /tmp/ansible-lxc-rpc
# Enter the repo directory
pushd /tmp/ansible-lxc-rpc
@shadone
shadone / speedtest_tester.sh
Created February 6, 2016 23:03
Send speedtest.net results to influxdb
#!/bin/bash
INFLUXDB_HOST="localhost"
INFLUXDB_PORT="8086"
DATABASE="home"
[ -f /etc/default/speedtest_tester ] && . /etc/default/speedtest_tester
while [[ $# > 0 ]]; do
key="$1"
# Copyright 2016, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@lbragstad
lbragstad / adminrc
Last active October 12, 2017 16:42
Keystone Credential Migration
export OS_USERNAME=admin
export OS_PASSWORD=password
export OS_PROJECT_NAME=admin
export OS_DEFAULT_DOMAIN=default
export OS_AUTH_URL=http://localhost:35357/v3/
export OS_IDENTITY_API_VERSION=3
@drbild
drbild / generate-persistent-net-rules.sh
Last active February 9, 2024 21:12
Generate udev rules for persistent interface names by bus path, not mac address
#!/bin/sh -e
# Copyright (C) 2006 Marco d'Itri <md@Linux.IT>
# Copyright (C) 2007 Kay Sievers <kay.sievers@vrfy.org>
# Copyright (C) 2018 David R. Bild <david.bild@xaptum.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.