Skip to content

Instantly share code, notes, and snippets.

View aheadley's full-sized avatar

Alex Headley aheadley

View GitHub Profile
@agrif
agrif / subsearch.py
Last active January 24, 2019 21:31
#!/usr/bin/env python3
import subprocess
import json
import os
import random
import tempfile
import pysubs2
import attr
import whoosh.fields
@sedrubal
sedrubal / cava.spec
Created October 27, 2015 21:52
cava - RPM SPEC
Name: cava
Version: 0.3.5
Release: 1%{?dist}
Summary: Console-based Audio Visualizer for Alsa
Group: Applications/Multimedia
License: MIT
URL: https://karlstav.github.io/%{name}/
Source0: https://github.com/karlstav/%{name}/archive/%{version}.tar.gz
@amhendley
amhendley / logitech-harmony-remote-on-linux.md
Last active August 12, 2023 06:25
Setting Up a Logitech Harmony Remote on Linux

Setting Up a Logitech Harmony Remote on Linux

After a fair bit of web searching and hacking, the following information should enable you in the configuration of your Logitech Harmony Remote and installation of client interfacing software on Linux to update your universal remote.

These instructions were compiled using Linux Mint 17 (Qiana) x86_64 and Firefox 34 at the time of writing.

Steps

Install Dependencies

The following is a list of identified libraries and tools the subsequent software for using your Logitech Harmony Remote.

@b1naryth1ef
b1naryth1ef / enum.py
Last active July 17, 2024 10:19
PeeWee Postgres Enum Field
from peewee import *
class BModel(Model):
class Meta:
database = db
@classmethod
def create_table(cls, *args, **kwargs):
for field in cls._meta.get_fields():
if hasattr(field, "pre_field_create"):
@agrif
agrif / drivenotes.md
Last active January 1, 2016 17:19
drive notes

Raid and BCache Notes

Day 1

Herein lies notes on the current drive configuration, recorded faithfully on this Thursday, December 19, in the year of our lord 2013.

@agrif
agrif / README.md
Last active September 6, 2022 07:32
my current ipxe setup

All of this should go into a directory that is available via HTTP and NFS. In variables.ipxe you can provide the HTTP root and NFS root paths, which are used later. Also there are some variables to set the default iscsi root (without the last part after the colon) and the initiator iqn. These are used to auto-fill the iscsi menu options.

You should tell iPXE to boot bootstrap.ipxe.

The bootstrap process reads a bunch of files and sets a bunch of variables. Of importance, it will read the file macs/XXXXXXX.ipxe

@Informatic
Informatic / Howto: iPXE+Windows7+iSCSI.markdown
Created June 30, 2013 05:26
Quick iPXE & Windows7-on-iSCSI howto

Quick Installation Howto

  1. Make sure you have successfuly set up iPXE, iSCSI target (iSCSI Enterprise Target on Debian works fine for me), TFTP server and some time to spend.
  2. Get yourself a NTFS-formatted USB stick.
  3. Copy contents of installation DVD into mentioned USB stick.
  4. Get a copy of wimboot and load it into your TFTP server.
  5. Copy boot/bcd, boot/boot.sdi, sources/boot.wim and bootmgr into TFTP root as well.
  6. Create the bootstrap script (included bootstrap.ipxe file) and boot your
@Vinai
Vinai / fix-url-keys.php
Last active September 2, 2022 16:24
This fixes the duplicate url_key issue in a Magento 1.8 / 1.13 installation.
<?php
/**
* Drop this into the shell directory in the Magento root and run with -h to see all options.
*/
require_once 'abstract.php';
/**
* Fix duplicate url keys for categories and products to work with the 1.8 alpha1 CE url key constraints.
@ctavan
ctavan / gist:4482825
Last active February 18, 2019 16:09
Init-script for optionally starting multiple redis instances on the same host running Ubunut/Debian. Highly inspired by the memcached init script that comes with the Ubuntu package. This is useful since redis is single-threaded.
#! /bin/bash
### BEGIN INIT INFO
# Provides: redis-server
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Should-Start: $local_fs
# Should-Stop: $local_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: redis-server - Persistent key-value db