Skip to content

Instantly share code, notes, and snippets.

View insanity54's full-sized avatar

Chris insanity54

View GitHub Profile
@insanity54
insanity54 / dbanlz.sh
Last active September 4, 2020 12:00
Erase a disk using dd - An alternative to DBAN
#!/bin/bash
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
warn='!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
echo -e "$warn\n$warn\n$warn"
echo " WARNING"
@insanity54
insanity54 / jiggle-gui.sh
Last active October 14, 2016 22:12
Jiggle/shake/move the mouse cursor to inhibit screensaver
#!/bin/bash
# GUI version. Could be really useful for Partedmagic. Work-in-progress.
export MAIN_DIALOG='
<window title="Mouse Jiggler">
<vbox>
<text>
<label>Jiggle the mouse to prevent the display from sleeping</label>
</text>
@insanity54
insanity54 / fortuneteller.sh
Last active December 31, 2016 22:21
Fortune generator
#!/bin/bash
# Have a character tell you a fortune every n minutes
# Dependencies:
# - sed
# - shuf
# - sleep
# - fortune
# - cowsay
#!/bin/bash
# automatically log into Thruk
# useful for wall mounted monitors
# midori is a low resources browser suitable for raspberryPi
pkill midori
midori http://example.com/thruk/#cgi-bin/tac.cgi &
sleep 5
wmctrl -i -r 0x2c00004 -b add,maximized_vert
@insanity54
insanity54 / deploy.txt
Last active May 23, 2017 00:29
Windows Package Deploy
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions
Enable-RemoteDesktop
cinst powershell
cinst notepadplusplus
cinst 7zip
cinst chocolatey
cinst firefox
cinst vlc
cinst malwarebytes
@insanity54
insanity54 / matrixBounce.sh
Created June 14, 2017 20:09
A Bash script which bounches a terminal (`cmatrix -bau5`) around the screen for screensaver purposes.
#!/bin/bash
##
## CONFIGURATION (Edit at will)
##
screenw=1280
screenh=1024
speed=2 # the amount of pixels to move the window by
debug=0 # level 0-2
@insanity54
insanity54 / output.txt
Last active July 4, 2017 02:58
ascii-truncator.py
, ,_
|`\ `;;, ,;;'
| `\ \ '. .'.'
| `\ \ '-""""-' /
`. `\ / |`
`> /; _ _ \
/ / | . ;
< (`";\ () ~~~ (/_
';;\ `, __ _.-'` )
>;\ ` _.'
---
- name: create array of installable package names
set_fact:
myItems:
- firefox
- googlechrome
- vcredist2008
- vcredist2012
- notepadplusplus
---
- fail:
when: var1 is undefined or
var2 is undefined or
var3 is undefined
@insanity54
insanity54 / index.js
Created August 7, 2017 01:06
lolguide-server
module['exports'] = function lolSummoner(hook) {
hook.res.json(hook.params);
http.get('https://na1.api.riotgames.com/lol/summoner/v3/summoners/by-name/'+hook.params.name, function(res) {
hook.debug(hook.params.name + " is the summoner name requested" + res.body);
hook.res.end(res.body);
}).on('error', function(e) {
hook.debug(e);
hook.res.end(e);
});