Skip to content

Instantly share code, notes, and snippets.

View johnnybridges's full-sized avatar

Johnny Bridges johnnybridges

View GitHub Profile
@jonraasch
jonraasch / drag-controls.html
Created September 2, 2010 22:28
Drag controls for oversized content
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Drag Controls for Oversized Content</title>
<style type="text/css">
#full-sized-area {
position: relative;
@vortex-5
vortex-5 / utorrent
Last active December 10, 2018 20:40
utorrent Linux startup script
#!/bin/sh
#
#
# Original source: http://forum.utorrent.com/viewtopic.php?id=88044
#
# uTorrent start stop service script
#
# copy to /etc/init.d
# run "update-rc.d utorrent defaults" to install
# run "update-rc.d utorrent remove" to remove
@simme
simme / Install_tmux
Created October 19, 2011 07:55
Install and configure tmux on Mac OS X
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@baopham
baopham / Monaco for Powerline.otf
Last active April 16, 2023 03:57
Patched font Monaco for OSX Vim-Powerline
@Yaffle
Yaffle / gist:1900579
Created February 24, 2012 12:08
setTimeout + Page Visibility API
function setVisibleTimeout(callback, delay) {
var id = null,
t = 0,
prefix = '';
'o webkit moz ms'.replace(/\S+/g, function (p) {
if ((p + 'Hidden') in document) {
prefix = p;
}
});
function onVisibilityChange(event) {
@fwenzel
fwenzel / plex_restart.sh
Created April 26, 2012 03:17
Simple watchdog script to restart plex media server if it becomes unresponsive.
#!/bin/bash
# If plex is not running, don't do anything.
plex_running=`ps ax | grep "\./Plex Media Server" | awk '{ print $1 }' | wc -l`
if [ "$plex_running" -eq 1 ]; then
exit 0
fi
# Test Plex web interface. If it's dead, this'll time out in a few seconds.
curl -I -m 8 "http://localhost:32400/library/sections" > /dev/null 2>&1
@djq
djq / gist:2846196
Last active September 27, 2022 04:12 — forked from rolo/gist:1481128
Install Postgres 9.1, PostGIS 2.0.2 and PG Routing on Ubuntu 12.04 (Precise Pangolin)
#!/bin/bash
#
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit)
# updated to PostGIS 2.0.1
# basics
apt-get install python-software-properties
apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3
# install the following pacakages
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php
$('[placeholder]').focus(function() {
var input = $(this);
if (input.val() == input.attr('placeholder')) {
input.val('');
input.removeClass('placeholder');
}
}).blur(function() {
var input = $(this);
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active June 5, 2024 18:00
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx