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
@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;
}
@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.
@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
@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
@cloudnull
cloudnull / config-undercloud.sh
Last active January 21, 2022 17:15
VM and vBMC Setup - installation and setup example
# install tripleo repos
# This will pull the latest version RPM
PKG=$(curl https://trunk.rdoproject.org/centos7/current/ | grep python2-tripleo-repos- | awk -F'"' '{print $8}')
# This will install it
yum install -y https://trunk.rdoproject.org/centos7/current/${PKG}
yum -y upgrade
@fatso83
fatso83 / format-code.gs
Last active August 25, 2021 20:46
Styles a paragraph as code. When adding this script using the Google Docs script editor it will appear under a new menu called "Extras"
// is called by google docs when a document is open
// adds a menu with a menu item that applies a style to the currently selected text
function onOpen() {
DocumentApp.getUi()
.createMenu('Extras')
.addItem('Apply code style', 'applyCodeStyle')
.addToUi();
}
var backgroundColor = "#DDDDDD";
@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"
@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
@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.
# 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,