Skip to content

Instantly share code, notes, and snippets.

View joshgachnang's full-sized avatar

Josh Gachnang joshgachnang

View GitHub Profile
@joshgachnang
joshgachnang / remove-movie-dupes.js
Last active March 20, 2023 17:14
Remove duplicate movies
// This is messy as all heck. Sorry! But it works.
// Warning: if you have the same movie from different years (e.g. The Italian Job from 1969 and 2003), one will be deleted
// incorrectly. This mainly catches movies that have different filenames but are still duplicates.
const glob = require("glob");
const fs = require("fs");
const getDirectories = function (src, callback) {
glob(src + "/**/*", callback);
};

Keybase proof

I hereby claim:

  • I am joshgachnang on github.
  • I am joshgachnang (https://keybase.io/joshgachnang) on keybase.
  • I have a public key ASD64l3sbWkyf_MO2Z0YkCSV3mTiaqJF00iCu7TWyzNo_go

To claim this, I am signing this object:

#!/bin/bash
# This script will turn on and off do not disturb mode in OSX. I use a cronjob to trigger this during my scheduled focus times.
if [ "$1" == "off" ]; then
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb -boolean false
killall NotificationCenter
echo "Disabled Do Not Disturb mode"
elif [ "$1" == "on" ]; then
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturb -boolean true
defaults -currentHost write ~/Library/Preferences/ByHost/com.apple.notificationcenterui doNotDisturbDate -date "`date -u +\"%Y-%m-%d %H:%M:%S +000\"`"

Keybase proof

I hereby claim:

  • I am pcsforeducation on github.
  • I am servercobra (https://keybase.io/servercobra) on keybase.
  • I have a public key ASC_L5RPv7e1G739sI-uJbVxDzQi5-Ibflw4uVVCr0C39go

To claim this, I am signing this object:

======================================================================
FAIL: ironic.tests.drivers.test_deploy_utils.RealFilePartitioningTestCase.test_different_sizes
tags: worker-3
----------------------------------------------------------------------
Empty attachments:
pythonlogging:''
stderr
stdout
Traceback (most recent call last):
process.stdin.setEncoding('utf8');
process.stdin.on('readable', function () {
var chunk = process.stdin.read();
if (chunk === null) {
return;
}
var line = chunk.split(" ");
if (line.length == 3 && line[0] == "Action") {
import logging
import sys
logging.basicConfig(filename="bot.log", level=logging.DEBUG)
logger = logging.getLogger()
class HoldemBot(object):
def __init__(self):
self.round = 0
import binascii
import socket
import struct
import sys
import select
LLDP_ETHERTYPE = 0x88cc
s1 = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, 0x88cc)
s1.bind(('ens9f0', 0x88cc))
import socket
s = socket.socket(socket.AF_PACKET, socket.SOCK_RAW)
s.bind(("eth0", 0x88CC))
while True:
print repr(s.recv(8192))
{
"networks": [ // a network is attached to one link and contains a set of L3 configs, such as IP/netmask or whether to dhcp
{
"id": "servicenet", //required
"type": "ipv4-static", //required
"link": "servicenet_vlan", //required, single link
"ip": "10.0.0.5",
"gateway_ip": "10.0.0.1",
"netmask": "255.255.0.0"
"dns_nameservers": ["10.0.3.2"],