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
@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,
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
# 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,
@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.
@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
@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"
@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";
@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
@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
@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