Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View jgrevich's full-sized avatar

Justin Grevich jgrevich

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jgrevich on github.
  • I am jgrevich (https://keybase.io/jgrevich) on keybase.
  • I have a public key whose fingerprint is 4A67 2917 1B64 93A2 4808 4C02 4683 9468 23F0 2F93

To claim this, I am signing this object:

@jgrevich
jgrevich / door_bell.sh
Created July 11, 2014 02:08
Wifi door bell script for ddwrt
#!/bin/bash
# setup constants
CURRENT_LIST_PATH=/tmp/wifi_client_macs_current
PREVIOUS_LIST_PATH=/tmp/wifi_client_macs_previous
while [ "true" ]
do
# backup old file if it exists
if [ -f $CURRENT_LIST_PATH ];
@jgrevich
jgrevich / 50-default.conf
Created July 29, 2014 19:39
Default rules for rsyslog
# Default rules for rsyslog.
#
# For more information see rsyslog.conf(5) and /etc/rsyslog.conf
#
# First some standard log files. Log by facility.
#
auth,authpriv.* /var/log/auth.log
*.*;auth,authpriv.none -/var/log/syslog
#cron.* /var/log/cron.log
# pkg-config --list-all | grep xml
libxml-2.0 libXML - libXML library version2.
xmlsec1 xmlsec1 - XML Security Library implements XML Signature and XML Encryption standards
xmlsec1-openssl xmlsec1-openssl - XML Security Library implements XML Signature and XML Encryption standards
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
$(document).on 'keypress', (event) ->
alert('You hit event: ' + event.which)
// import the CSS framework
$btn-default-bg: #4c77a0;
$btn-default-color: #fff;
$btn-font-weight: bold;
$btn-default-border: #608cb6;
$border-color: #66afe9;
$link-color: #005288;
@mixin focused() {
@jgrevich
jgrevich / konami.js
Created January 7, 2015 04:56
konami code easter egg in js
$(function () {
// konami code - up up down down left right left right b a
var code1 = String.fromCharCode(38, 38, 40, 40, 37, 39, 37, 39, 66, 65);
var code2 = String.fromCharCode(38, 38, 40, 40, 37, 39, 37, 39, 65, 66);
var codeBuffer = "";
$(document).keyup(function (e) {
codeBuffer += String.fromCharCode(e.which);
if (code1.substring(0, codeBuffer.length) == codeBuffer) {
if (code1.length == codeBuffer.length) {
toggle1();
@jgrevich
jgrevich / fips-bork.sh
Created February 13, 2015 04:50
Am I doing something wrong?
OPENSSL_FORCE_FIPS_MODE= ruby -rdigest -e "puts Digest::MD5.hexdigest('hi')"
md5_dgst.c(78): OpenSSL internal error, assertion failed: Digest MD5 forbidden in FIPS mode!
Aborted
@jgrevich
jgrevich / gist:a9d20756253ac3938c6a
Created May 8, 2015 23:26
Convert flac files to mp3 and move to subfolders
for f in *.flac; do flac -cd "$f" | lame --preset extreme - "${f%.*}".mp3; done && mkdir mp3 flac; mv *.mp3 mp3; mv *.flac flac/
@jgrevich
jgrevich / gist:2572469
Created May 1, 2012 23:51
fnichol/chef-rvm issue #51
Ubuntu 12.04
## ubuntu@ubuntu:/tmp/chef-solo$ cat nodes/192.168.126.136.json
{
"authorization": {
"sudo": {
"groups": ["adm", "wheel"],
"users": ["ubuntu"],