Skip to content

Instantly share code, notes, and snippets.

View thedward's full-sized avatar

Thedward Blevins thedward

View GitHub Profile
@thedward
thedward / debian-kobo-dev.md
Last active March 11, 2024 01:09
Setting up Kobo Development Tools on Debian Jessie
@thedward
thedward / date.js
Created September 27, 2016 19:50
date.js
/**
* @version: 1.0 Alpha-1
* @author: Coolite Inc. http://www.coolite.com/
* @date: 2008-05-13
* @copyright: Copyright (c) 2006-2008, Coolite Inc. (http://www.coolite.com/). All rights reserved.
* @license: Licensed under The MIT License. See license.txt and http://www.datejs.com/license/.
* @website: http://www.datejs.com/
*/
Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns
{
"Database": [ "Access", "Account Creation", "Connection Failed", "Disk Utilization", "Down", "Memory", "Status Unknown", "Tablespace Full", "Unknown" ],
"Network": [ "Access", "CAPWAP ECHO ERR", "CPU Utilization", "Duplex Mismatch", "Fan", "Host Down", "Interface Down", "Interface Utilization", "Neighbor Down", "Node Down", "OSPF ADJCHG", "Power Supply", "Proxy IP Blacklist Request", "Site Unreachable", "Spanning Tree", "Unexpected Reboot", "Unknown", "Webex" ],
"Storage": [ "Access", "Account", "Backup", "Interface Down", "Unknown" ],
"Service Desk": [ "Access", "Account Creation", "Backup", "Password", "Password Reset", "Password Reset: Active Directory", "Password Reset: Application", "Password Reset: Exchange", "Password Reset: McAfee", "Password Reset: SSO", "Unknown", "VPN Token" ],
"IPT and Telepresence": [ "Access", "Agent Restarted", "Host Down", "Password Reset", "Unknown", "Voice Incident", "Voicemail" ],
"Systems": [ "Access", "Account", "Account Creation", "Agent Down", "Agent Insta
#cVim-command-bar, #cVim-command-bar-mode, #cVim-command-bar-input, #cVim-command-bar-search-results,
.cVim-completion-item, .cVim-completion-item .cVim-full, .cVim-completion-item .cVim-left,
.cVim-completion-item .cVim-right {
/* font-family: Helvetica, Helvetica Neue, Neue, sans-serif, monospace, Arial; */
font-family: "M+ 1m","Input","PragmataPro","Consolas","Incosoloata","TheMixMono","Monospace";
font-size: 10pt !important;
-webkit-font-smoothing: antialiased !important;
}
#cVim-command-bar {
@thedward
thedward / vim_ascii-ligatures.patch
Last active July 26, 2016 17:38
This patch for Vim enables (buggy) support for the programming ligatures in fonts like HaskLig and FiraCode — via https://groups.google.com/d/msg/vim_dev/0sETSAwe5Wo/mg3vhLebImIJ
diff -r 94df797ed6b0 -r e86e08d8e7af src/gui_gtk_x11.c
--- a/src/gui_gtk_x11.c Sat Apr 12 13:12:24 2014 +0200
+++ b/src/gui_gtk_x11.c Sun Apr 20 14:50:35 2014 +0200
@@ -4311,7 +4311,7 @@ get_styled_font_variants(void)
static PangoEngineShape *default_shape_engine = NULL;
/*
- * Create a map from ASCII characters in the range [32,126] to glyphs
+ * Create a map from ASCII characters [ ,0-9,a-z,A-Z] to glyphs
* of the current font. This is used by gui_gtk2_draw_string() to skip
@thedward
thedward / todo.txt
Created May 9, 2016 16:46
todo.txt
* research vim-gista
@thedward
thedward / transmission-per-user.bash
Created December 9, 2015 04:25
Per user transmission-daemon on Debian with systemd
#!/bin/bash
sudo apt-get install transmission-daemon
service_path=/lib/systemd/system/[email protected]
if ! [ -s "$service_path" ]
then
sudo tee "$service_path" <<-UNIT
[Unit]
@thedward
thedward / urlencode.sh
Last active August 26, 2016 12:11 — forked from cdown/gist:1163649
Bash urlencode and urldecode
urlencode() {
# urlencode <string>
local LANG=C
local length="${#1}"
for (( i = 0; i < length; i++ )); do
local c="${1:i:1}"
case $c in
[a-zA-Z0-9.~_-]) printf "$c" ;;
*) printf '%%%02X' "'$c" ;;
@thedward
thedward / bookmarklet.html
Created October 14, 2015 20:47
Bookmarklet for downloading HTML5 videos
javascript:(function(xs)%7Bfor(var%20i%3D0%3Bi%3Cxs.length%3B%2B%2Bi)%7Bif(xs%5Bi%5D.currentSrc)%7Breturn%20window.open(xs%5Bi%5D.currentSrc)%3B%7D%7D%7D)(document.querySelectorAll('audio%2Cvideo'))%3B
@thedward
thedward / cvimrc
Last active June 14, 2017 23:23
cvimrc
"set numerichints
"set typelinkhints
set nativelinkorder
let hintcharacters = "asonetuhid"
yankText(link) -> {{
var text = link.text;
text = text.replace(/^(\s|\n)+|(\s|\n)+$/g,'');