Skip to content

Instantly share code, notes, and snippets.

View ConsoleCatzirl's full-sized avatar

Joni Harker ConsoleCatzirl

  • Earth
View GitHub Profile
@ConsoleCatzirl
ConsoleCatzirl / migrate.py
Created May 14, 2013 23:32
elasticsearch migration
import requests
import logging
logging.basicConfig(format='%(asctime)s\t%(name)-16s %(levelname)-8s %(message)s')
#very noisy library
requests_log = logging.getLogger("requests")
requests_log.setLevel(logging.WARNING)
logger = logging.getLogger('es_migrate')
@ConsoleCatzirl
ConsoleCatzirl / auth.py
Created December 17, 2013 17:46
Test hpcloud auth
import restclient
import json
import os
class ident(object):
def __init__(self, region_url, debug=False):
self.debug = debug
self.connect(url=region_url)
def __enter__(self):
@ConsoleCatzirl
ConsoleCatzirl / git_purge.sh
Created February 25, 2014 19:42
purge file from git
#!/bin/bash
set -o errexit
# Author: David Underhill
# Script to permanently delete files/folders from your git repository. To use
# it, cd to your repository's root and then run the script with a list of paths
# you want to delete, e.g., git-purge path1 path2
if [ $# -eq 0 ]; then
exit 0
@ConsoleCatzirl
ConsoleCatzirl / id_ecdsa.pub
Last active August 29, 2015 13:56
jesusaurus@avalon
ecdsa-sha2-nistp521 AAAAE2VjZHNhLXNoYTItbmlzdHA1MjEAAAAIbmlzdHA1MjEAAACFBADfkf+IoIighmFoYFaCQopaOQyRoE0B5eiJ6gKLUbJdTxxaxAq8y1bIj2XWAk8Uy/uqWUdOVAvcOkwUGBMBH5YZRAFcMNZk5QbUOSpZyC2sr0yKxZsshjqnUyZIifIQp1ydwE73N8CkH+FhKIGyeNE/x3jI7xXsePNoL/H2GKNzri0peA== jesusaurus@avalon
#/bin/bash
# vim: tabstop=2:softtabstop=2:shiftwidth=2:noexpandtab
#
# Authored by Yazz D. Atlas <[email protected]>
#
# 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
@ConsoleCatzirl
ConsoleCatzirl / hope-dump.sh
Last active July 28, 2016 18:25 — forked from haxwithaxe/hope-dump.sh
download all the things
#!/bin/bash
URL_BASE="http://livestream.com/internetsociety" #"/hopeconf"
VIDEO_TYPE="progressive_url"
dump_track(){
wget -O - "http://livestream.com/internetsociety${1}/hopeconf" 2>/dev/null| sed 's/","/",\n"/g' | grep $VIDEO_TYPE | grep -v smil | sed 's/[",]\+$//;s/.*"//' | grep http
}
for url in $(dump_track | tee lamarr); do
@ConsoleCatzirl
ConsoleCatzirl / nowake.sh
Created January 17, 2022 20:20
Prevent immediate resume-from-suspend
#!/bin/sh
# disable all acpi wakeups except the power button
cat /proc/acpi/wakeup | grep enabled | grep -v PWRB |
while read dev foo
do
echo $dev > /proc/acpi/wakeup
done