Skip to content

Instantly share code, notes, and snippets.

View p-hennessy's full-sized avatar
🌤️
Head in the Cloud

Pat Hennessy p-hennessy

🌤️
Head in the Cloud
View GitHub Profile
Presentation 1 - Basic Unix Commands and Concepts
Cover
How to find help (man pages)
Navigation
pwd, ls, cd
File system structure
File creation / deletion
rm, rmdir, mkdir, touch
File viewing
cat, more/less, head/tail, column
@p-hennessy
p-hennessy / Ribbon
Created February 10, 2014 08:54
Ribbon style h1 that will look liek its wrapped around the page parent element. Uses psudo classes to achieve this. Makes for pure markup and no extra
h1{
background:-moz-linear-gradient(top, #f0f0f0 0%, #d4d4d4 100%);
font-family:Helvetica;
color:#303030;
text-shadow:0 1px 0 white;
width:300px;
margin-top:20px;
margin-left:-20px;
position:relative;
@p-hennessy
p-hennessy / autoclicker
Created December 14, 2014 11:18
Super cookie clicker!
var hov=false;setInterval(function(){if(hov){ $('#bigCookie').click();}}, 1);var cookieDiv=document.getElementById('bigCookie');cookieDiv.addEventListener('mouseenter',function(){hov = true});cookieDiv.addEventListener('mouseleave',function(){hov = false});
@p-hennessy
p-hennessy / genstr.py
Created December 29, 2014 03:58
Python Random String Generator
#!/usr/bin/python
import random
def genId(length=10, charset="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"):
output = ""
for i in range(length):
output += random.choice(charset)
@p-hennessy
p-hennessy / syntax.py
Created February 5, 2015 01:49
Python Syntax Highlight Tester
#!/usr/bin/python
import os, sys
from django import urls
class MyClass(os.windows):
aVar = 'chicken'
__init__(self):
aVar = None
#!/bin/bash
IPTABLES=/sbin/iptables
LOG_LEVEL="notice"
# Flush Existing Rules
echo 'Flushing current ruleset...'
$IPTABLES -F
$IPTABLES -F INPUT
import threading
import Queue
import time
# Thread manager
class ThreadPool():
def __init__(self):
self.threads = []
self.tasks = Queue.Queue(10)
@p-hennessy
p-hennessy / Bare bones asyncio TCP Echo server
Created January 29, 2017 01:09
An extremely basic asyncio TCP echo server
import asyncio
class Echo(asyncio.Protocol):
def connection_made(self, transport):
print('connection made')
self.transport = transport
def connection_lost(self, exc):
print('connection lost:', exc)
@p-hennessy
p-hennessy / TF2 Custom Rocket Jump Script
Created February 12, 2017 22:59
Sets up for practicing jumps and rollouts
//Disable Timer
sv_cheats 1
mp_tournament 1
mp_tournament_restart
con_timestamp 0
//Mimic real network latency
net_fakelag 25
//Binds