This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Clock</title> | |
<style> | |
body { | |
display: flex; | |
justify-content: center; | |
align-items: center; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import matplotlib.pyplot as plt | |
import threading | |
# Use a nicer style for the plot | |
plt.style.use('seaborn-darkgrid') | |
def get_wifi_data(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fullAlphabet = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; | |
const restrictedAlphabet = 'BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz'; | |
const threadPrefix = 'thread-'; | |
const messagePrefix = 'msg-'; | |
const isWhitespace = str => /^[\s\xa0]*$/.test(str); | |
const isInvalidString = str => str ? (str.indexOf(threadPrefix) !== -1 || str.indexOf(messagePrefix) !== -1) : false; | |
const encode = function(str) { | |
if (isWhitespace(str)) return str; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; how to write scripts: http://www.autohotkey.com/docs/ | |
#IfWinActive ahk_class CabinetWClass ; File Explorer | |
^Backspace:: | |
#IfWinActive ahk_class Progman ; Desktop | |
^Backspace:: | |
#IfWinActive ahk_class Notepad | |
^Backspace:: | |
Send ^+{Left}{Backspace} | |
#IfWinActive |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apache .htaccess | |
# angularjs pushstate (history) support: | |
# See http://www.josscrowcroft.com/2012/code/htaccess-for-html5-history-pushstate-url-routing/ | |
<ifModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_URI} !index | |
RewriteRule (.*) index.html [L] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(window).ready(function() { | |
$(document).arrive('.hover-row', function() { | |
$('.data-table > tbody > tr').hover(function() { | |
var rowNum = $(this).children('.row-num').text(); | |
$(this).closest('.table-div').children('.hover-row').val(rowNum); | |
}); | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd /tmp | |
# libevent | |
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz | |
tar xvf libevent-2.1.8-stable.tar.gz | |
cd libevent-2.1.8-stable | |
./configure --prefix=$HOME | |
make -j 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ==VimperatorColorSchema== | |
" name: Solarlized enhanced by Kenta Suzuki. (Based on 'Solarized') | |
" url: https://github.com/suzuken/dotfiles/blob/master/vimperator/colors/solarized.vimp | |
" ==/VimperatorColorSchema== | |
" | |
" Solarized - Ethan Schoonover | |
" http://ethanschoonover.com/solarized | |
" | |
" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B RGB HSB | |
" --------- ------- ---- ------- ----------- ---------- ----------- ----------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
mkdir -p /home/mshuff | |
chown mshuff:mshuff /home/mshuff | |
usermod -d /home/mshuff mshuff |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var flattenObject = function(ob) { | |
var toReturn = {}; | |
for (var i in ob) { | |
if (!ob.hasOwnProperty(i)) continue; | |
if ((typeof ob[i]) == 'object') { | |
var flatObject = flattenObject(ob[i]); | |
for (var x in flatObject) { | |
if (!flatObject.hasOwnProperty(x)) continue; |
NewerOlder