Skip to content

Instantly share code, notes, and snippets.

View dekimsey's full-sized avatar

Daniel Kimsey dekimsey

View GitHub Profile
@rcmachado
rcmachado / html5.vim
Created December 15, 2009 10:35
Vim syntax file for HTML 5
" Vim syntax file
" Language: HTML (version 5)
" Maintainer: Rodrigo Machado <rcmachado@gmail.com>
" URL: http://gist.github.com/256840
" Last Change: 2010 Aug 26
" License: Public domain
" (but let me know if you liked it :) )
"
" Note: This file just adds the new tags from HTML 5
" and don't replace default html.vim syntax file
@MicahElliott
MicahElliott / colortrans.py
Created November 29, 2010 07:57
Convert values between RGB hex codes and xterm-256 color codes.
#! /usr/bin/env python
""" Convert values between RGB hex codes and xterm-256 color codes.
Nice long listing of all 256 colors and their codes. Useful for
developing console color themes, or even script output schemes.
Resources:
* http://en.wikipedia.org/wiki/8-bit_color
* http://en.wikipedia.org/wiki/ANSI_escape_code
@obeleh
obeleh / gist:4451005
Last active March 10, 2021 09:47
Python autovivicating tree with parent reference (variation of the one-line tree)

I was reading the gist @https://gist.github.com/2012250

I found the autovivification functionality of it pretty cool. If only I could have a parent reference...

Obviously this was not going to be a one-line tree. But that wasn't the goal

A simple variant:

from collections import defaultdict
@omaciel
omaciel / gist:5709991
Last active August 24, 2016 18:40
A simple Katello CLI script to automatically download a product manifest, import it into a Katello organization and create content. It assumes that you have the following information (either as environmental variables or substituted into the script: ``` RHN_USERNAME: A valid username for https://access.redhat.com/ RHN_PASSWORD: A valid password …
#!/bin/bash
function kk() {
KATELLO_PATH=/usr/bin/katello
$KATELLO_PATH -u admin -p admin "$@"
}
ORG='SimpleOrg'
# Orgs
8.2.3. HTTP log format
----------------------
The HTTP format is the most complete and the best suited for HTTP proxies. It
is enabled by when "option httplog" is specified in the frontend. It provides
the same level of information as the TCP format with additional features which
are specific to the HTTP protocol. Just like the TCP format, the log is usually
emitted at the end of the session, unless "option logasap" is specified, which
generally only makes sense for download sites. A session which matches the
"monitor" rules will never logged. It is also possible not to log sessions for
@fogleman
fogleman / words.md
Last active June 27, 2024 07:55
Mnemonic Encoding Word List

Mnemonic Encoding Word List

http://web.archive.org/web/20090918202746/http://tothink.com/mnemonic/wordlist.html

  • The wordlist contains 1626 words.
  • All words are between 4 and 7 letters long.
  • No word in the list is a prefix of another word (e.g. visit, visitor).
  • Five letter prefixes of words are sufficient to be unique.
  • The words should be usable by people all over the world. The list is far from perfect in that respect. It is heavily biased towards western culture and English in particular. The international vocabulary is simply not big enough. One can argue that even words like "hotel" or "radio" are not truly international. You will find many English words in the list but I have tried to limit them to words that are part of a beginner's vocabulary or words that have close relatives in other european languages. In some cases a word has a different meaning in another language or is pronounced very differently but for the purpose of the encoding it is still ok - I assume that when the encoding is
@erikcox
erikcox / SimCityLoadingMessages.txt
Created November 11, 2015 21:23
A list of loading messages from the game SimCity, which I repurposed for Slack loading messages.
Adding Hidden Agendas
Adjusting Bell Curves
Aesthesizing Industrial Areas
Aligning Covariance Matrices
Applying Feng Shui Shaders
Applying Theatre Soda Layer
Asserting Packed Exemplars
Attempting to Lock Back-Buffer
Binding Sapling Root System
Breeding Fauna
@shmup
shmup / torrents.md
Last active July 2, 2024 19:05
transmission blocklist guide

Transmission Blocklist

The Transmission torrent client has an option to set a Blocklist, which helps protect you from getting caught and having the DMCA send a letter/email.

It's as simple as downloading and installing the latest client:

@JakeDEvans
JakeDEvans / kickstart_disk.cfg
Last active August 13, 2021 14:18
Kickstart config for full disk LVM (no partitions)
# Expects 2 vm disks
# Disk 1 = 1GB
# Disk 2 = DATA (5GB or larger)
# Disk Layout
clearpart --all --initlabel --drives=sda
part biosboot --fstype=biosboot --size=1 --ondisk=sda
part /boot --fstype=xfs --size=512 --grow --ondisk=sda
logvol swap --fstype=swap --name=swap --vgname=vg01 --size=512
logvol /tmp --fstype xfs --name=tmp --vgname=vg01 --size=1024
logvol / --fstype xfs --name=root --vgname=vg01 --size=2048 --grow
@paxswill
paxswill / pfsense_cert_to_keystore.sh
Created September 27, 2017 17:41
Simple script to copy certificates from pfSense's certificate manager (which in my case were being updated with Let's Encrypt) to a Java keystore (in my case the one being used by Ubiquiti's Unifi Controller).
#!/bin/sh
set -eu
XMLLINT=/usr/local/bin/xmllint
BASE64_DECODE='/usr/local/bin/python2 -m base64 -d'
OPENSSL="/usr/bin/openssl"
KEYTOOL="/usr/local/bin/keytool"
PFSENSE_CONF=/cf/conf/config.xml