Skip to content

Instantly share code, notes, and snippets.

View obihann's full-sized avatar

Jeffrey Hann obihann

View GitHub Profile
@obihann
obihann / index.php
Last active August 29, 2015 13:57
Basic PHP error logging
<?php
// Configure error levels
error_reporting(E_ERROR);
ini_set('display_errors', 1);
// Path to err log
$errorLogs = "/var/www/logs/error.log";
// Obtain IP of remote client
$requestIP = $_SERVER['REMOTE_ADDR'];
@obihann
obihann / preload.coffee
Last active August 29, 2015 13:57
jQuery Image Preloader Function
$.fn.preload = ->
@each ->
$("<img/>")[0].src = this
@obihann
obihann / README.md
Last active August 13, 2023 21:55 — forked from jewel-andraia/README.md
Two Python scripts to help RES (Reddit Enhancement Suite) users manage their backups and convert between platforms.
#ACTION {You can't go that way - the door is closed.}
{
#map undo;
open
}
{5}
#ACTION {You can't go that way.}
{
#map undo
@obihann
obihann / .nethackrc
Last active November 21, 2020 17:03
NetHack Config
OPTIONS=showexp,showscore,time,color,!autopickup,pickup_burden:unencumbered
OPTIONS=pickup_types:$?!/(+
OPTIONS=autodig,fruit:slime mold,boulder:0
OPTIONS=number_pad:2
OPTIONS=suppress_alert:3.4.3
MSGTYPE=hide "You displaced *." # pet displacement
OPTIONS=statuscolors
STATUSCOLOR=hp%100=green,hp%66=yellow,hp%50=orange
@obihann
obihann / irssi config
Created February 13, 2014 20:28
irssi config
servers = (
{
address = "irc.freenode.net";
chatnet = "freenode";
port = "6667";
use_ssl = "no";
ssl_verify = "no";
autoconnect = "yes";
},
{
@obihann
obihann / dynmotd
Last active August 29, 2015 13:56
Dynamic message of the day
#!/bin/bash
PROCCOUNT=`ps -l | wc -l`
PROCCOUNT=`expr $PROCCOUNT - 4`
if [[ $(groups) == *irc* ]]; then
ENDPROC=`cat /etc/security/limits.conf | grep "@irc" | grep nproc | awk {'print $4'}`
ENDSESSION=`cat /etc/security/limits.conf | grep "@irc" | grep maxlogins | awk {'print $4'}`
PRIVLAGED="IRC Account"
else
@obihann
obihann / Gruntfile.js
Created February 13, 2014 16:58
Default Grunt config file for CoffeeScript, Jade, and SASS
'use strict';
module.exports = function (grunt) {
grunt.initConfig({
pkg : grunt.file.readJSON('package.json'),
watch: {
coffee: {
files: ['src/**/*.coffee'],
tasks: ['coffee', 'sync']
},
@obihann
obihann / tea.md
Last active August 29, 2015 13:56
HTTP 418 Status Im a Teapot

#Hyper Text Coffee Pot Control Protocol

  The Hyper Text Coffee Pot Control Protocol (HTCPCP) is a facetious communications protocol for 
  controlling, monitoring, and diagnosing coffee pots. It is specified in RFC 2324, 
  published on 1 April 1998 as an  April Fools' Day RFC as part of an April Fools prank.

http://en.wikipedia.org/wiki/Hyper_Text_Coffee_Pot_Control_Protocol

@obihann
obihann / README.md
Last active March 3, 2021 15:10
A shell script to display the space invaders dudes in colour.