Skip to content

Instantly share code, notes, and snippets.

Testing, testing, testing. Coding. Is this working? Yaaay!

Josh Frankel joshmfrankel

Testing, testing, testing. Coding. Is this working? Yaaay!
Block or report user

Report or block joshmfrankel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
joshmfrankel / template_error.rb
Created Jul 11, 2017
Ruby: Template Pattern
View template_error.rb
raise NotImplementedError, "This #{self.class} cannot respond to:"
joshmfrankel / .zshrc
Last active Oct 16, 2019
Oh-my-zsh + powerlevel9k + powerline fonts + awesome-terminal-fonts + syntax highlighting
View .zshrc
# References
# OhMyZsh:
# Powerlevel9k:
# Powerline fonts:
# Awesome Terminal Fonts:
# ZSH Syntax Highlighting:
# For more plugins search this repo:
# 256 color mode
joshmfrankel / gist:1fb4297713e1d856e7f94afa474efacf
Last active Oct 20, 2016
Elementary Os: Upgraded packages (apt-get upgrade)
View gist:1fb4297713e1d856e7f94afa474efacf
# From /var/log/apt/history.log
* init:amd64 (1.29ubuntu2, 1.29ubuntu3),
* libnm-glib4:amd64 (1.2.2-0ubuntu0.16.04.1, 1.2.2-0ubuntu0.16.04.3),
* init-system-helpers:amd64 (1.29ubuntu2, 1.29ubuntu3),
* pantheon-files:amd64 (,,
* linux-libc-dev:amd64 (4.4.0-38.57, 4.4.0-43.63),
* libavutil-ffmpeg54:amd64 (7:2.8.6-1ubuntu2, 7:2.8.8-0ubuntu0.16.04.1),
* libsystemd0:amd64 (229-4ubuntu10, 229-4ubuntu11),
joshmfrankel /
Last active Sep 22, 2016
Linux: Install script
# Add Repos
echo ""
echo "============================="
echo " Adding Third-party Repos "
echo "============================="
echo ""
sudo apt-key adv --keyserver hkp:// --recv-keys BBEBDCB318AD50EC6865090613B00F1FD2C19886
joshmfrankel / Fixes
Last active May 30, 2017
Linux: Install guide
View Fixes
# NFSD for vagrant
sudo apt-get install nfs-common nfs-kernel-server
# Mouse Flickering
# I had the same problem. You can fix it manually. Open System Settings > Displays. In the Displays window, you will see an Unknown monitor. Click it and disable it.
# libcrypt fix for spotify
# Fix login shell bug with gconf-editor
joshmfrankel / Gruntfile.js
Last active Aug 29, 2015
GRUNT: Basic setup for load-grunt-config
View Gruntfile.js
module.exports = function(grunt) {
// Retrieve package settings
var config = {
pkg: grunt.file.readJSON('package.json'),
env: process.env,
dir: {
php : ['**/file1.php', 'file2.php'],
js : ['**/*.js'],
sass: ['**/*.scss']
joshmfrankel /
Last active Aug 29, 2015
SHELL: Battery script to make sure overcharging doesn't happen
notify-send "Battery monitoring enabled"
while true
export DISPLAY=:0.0
battery_level=`acpi -b | grep -P -o '[0-9]+(?=%)'`
if on_ac_power; then
if [ $battery_level -ge 90 ]; then
notify-send "Battery charging above 90%. Please unplug your AC adapter!" "Charging: ${battery_level}% "
joshmfrankel / parsediasql.perl
Last active Aug 29, 2015
Perl: ParseDiaSql Output file patch
View parsediasql.perl
eval 'exec /usr/bin/perl -S $0 ${1+"$@"}'
if 0; # not running under some shell
# $Id: parsediasql,v 1.10 2011/02/16 10:23:11 aff Exp $
use strict;
use warnings;
joshmfrankel / cmd.ahk
Last active Aug 29, 2015
AHK: Console2, Windows Volume, and Spotify
View cmd.ahk
DetectHiddenWindows, on
IfWinExist ahk_class Console_2_Main
IfWinActive ahk_class Console_2_Main
WinHide ahk_class Console_2_Main
WinActivate ahk_class Shell_TrayWnd
joshmfrankel / .htacess
Created Sep 23, 2014
Apache: Force HTTPS in .htacess
View .htacess
# Force HTTPS on server
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,QSA,L]
You can’t perform that action at this time.