Skip to content

Instantly share code, notes, and snippets.

View hoserdude's full-sized avatar

Tim Hobson hoserdude

View GitHub Profile
@hoserdude
hoserdude / doge.txt
Created June 15, 2015 15:15
Doge ASCII
▄ ▄
▌▒█ ▄▀▒▌
▌▒▒█ ▄▀▒▒▒▐
▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐
▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐
▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌
▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌
▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐
▐░░░▒▒▒▒▒▒▒▒▌██▀▒▒░░░▒▒▒▀▄▌
▌░▒▄██▄▒▒▒▒▒▒▒▒▒░░░░░░▒▒▒▒▌
@hoserdude
hoserdude / login.html
Last active August 29, 2015 14:17
Minimalist Login Screen
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
</head>
<body>
<div>
<form method="post" action="login">
<h3>Please sign in</h3>
<input type="text" placeholder="User name" name="username"/>
[alias]
lg1 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold white)— %an%C(reset)%C(bold yellow)%d%C(reset)' --abbrev-commit --date=relative
lg2 = log --graph --all --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(bold white)— %an%C(reset)' --abbrev-commit
lg = !"git lg1"
@hoserdude
hoserdude / coyote.py
Created December 1, 2014 05:30
Coyote and RoadRunner
import turtle
from random import random
#Function to make a coyote (a custom turtle)
def make_coyote():
coyote = turtle.Turtle()
coyote.speed( 10 )
coyote.color( 80, 80, 80 )
return coyote
@hoserdude
hoserdude / doge.groovy
Created April 8, 2014 18:02
Useless Doge CRaSH command
package commands
import org.crsh.cli.Command
import org.crsh.cli.Usage
class doge {
@Usage("Display the doge")
@Command
public Object main() {
def doge = new StringBuffer();
@hoserdude
hoserdude / doge.java
Created March 23, 2014 03:20
Useless Doge Banner
public static void leDoge() {
StringBuffer doge = new StringBuffer();
doge.append("░░░░░░░░░▄░░░░░░░░░░░░░░▄").append("\n");
doge.append("░░░░░░░░▌▒█░░░░░░░░░░░▄▀▒▌").append("\n");
doge.append("░░░░░░░░▌▒▒█░░░░░░░░▄▀▒▒▒▐").append("\n");
doge.append("░░░░░░░▐▄▀▒▒▀▀▀▀▄▄▄▀▒▒▒▒▒▐").append("\n");
doge.append("░░░░░▄▄▀▒░▒▒▒▒▒▒▒▒▒█▒▒▄█▒▐").append("\n");
doge.append("░░░▄▀▒▒▒░░░▒▒▒░░░▒▒▒▀██▀▒▌").append("\n");
doge.append("░░▐▒▒▒▄▄▒▒▒▒░░░▒▒▒▒▒▒▒▀▄▒▒▌").append("\n");
doge.append("░░▌░░▌█▀▒▒▒▒▒▄▀█▄▒▒▒▒▒▒▒█▒▐").append("\n");
@hoserdude
hoserdude / ReplaceTokens.ps1
Created June 18, 2013 19:43
Replace tokenized values in a file using PowerShell
function Replace-Tokens
{
param(
[string]$inputFile,
[string]$outputFile,
[string]$token,
[string]$tokenValue
)
(Get-Content $inputFile) | foreach-object { $_ -replace $token, $tokenValue } | Set-Content $outputFile
@hoserdude
hoserdude / delete-recursively.ps1
Created February 25, 2013 21:24
PowerShell equivalent to rm -r {pattern}. Usage: delete-recursively.ps1 *.foo
Get-ChildItem . -r $args[0] | Remove-Item -r -force