Skip to content

Instantly share code, notes, and snippets.

View JamieHouston's full-sized avatar

Jamie Houston JamieHouston

View GitHub Profile
@regebro
regebro / ispstatus
Last active February 10, 2023 08:48
A script that checks that the wifi is working, that the LAN is working and if the internet is working. Good for logging ISP problems.
#!/usr/bin/env python3
from datetime import datetime
from urllib import request, error
from subprocess import check_output, CalledProcessError
from io import StringIO
from time import tzname, localtime
import socket
LOCAL_NET_URLS = {'r': 'http://192.168.1.1',
}
@greglboxer
greglboxer / pre-push.sh
Last active August 29, 2015 13:57 — forked from city41/pre-push.sh
#!/bin/sh
# Called by "git push" after it has checked the remote status,
# but before anything has been pushed.
#
# If this script exits with a non-zero status nothing will be pushed.
#
# Steps to install, from the root directory of your repo...
# 1. Copy the file into your repo at `.git/hooks/pre-push`
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push`
@rsff
rsff / ssh_agent_start.fish
Last active March 14, 2019 08:56 — forked from schaary/ssh_agent_start.fish
ssh agent for fish
#this script can never fail
#i use it in the fish_config
#call it with start_agent
setenv SSH_ENV $HOME/.ssh/environment
function start_agent
if [ -n "$SSH_AGENT_PID" ]
ps -ef | grep $SSH_AGENT_PID | grep ssh-agent > /dev/null
@madzak
madzak / xcode_gems
Created October 8, 2012 18:48
Xcode Handy Snippets
# Show View Hicharchy
po [[UIWindow keyWindow] recursiveDescription]
@codingoutloud
codingoutloud / .gitignore
Last active October 9, 2016 15:34
Git Ignore for ASP.NET MVC / Windows Azure development
# .gitignore for ASP.NET MVC / Windows Azure development
# Original file: https://gist.github.com/3318347 by @codingoutloud
## Github doc on ignoring files: https://help.github.com/articles/ignoring-files
## The man page for .gitignore (referenced by github): http://man.cx/gitignore
## Of possible interest (can be complex): https://github.com/github/gitignore
# Troubleshooting
# 1. If you add a .gitignore file to an existing repo (or significantly change one), you may want
# to force it to act as though the new/updated .gitignore was in force the whole time.
## http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring
@seanbehan
seanbehan / remove_orig_files.sh
Created January 12, 2012 16:42
Recursively Delete .Orig Files After Failed Git Merge
# recursively delete original files after a git merge failure
find . -name *.orig -delete
@mastergizmo
mastergizmo / jq-mobile-green-button-theme.css
Created August 5, 2011 16:08 — forked from irohiroki/gist:909284
jQuery Mobile Green Theme for Buttons
.ui-btn-up-g, .ui-btn-hover-g, .ui-btn-down-g
{
color: white;
font-weight: bold;
text-decoration: none;
}
.ui-btn-up-g
{
border: 1px solid #397114;