This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
# | |
# DESCRIPTION: | |
# This handler formats Sensu alerts and sends them off to a Fleep.io webhook. | |
# | |
# OUTPUT: | |
# | |
# PLATFORMS: | |
# All | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'Smile, life is beautiful' => [':-)', ':)', ':=)'], | |
'Sad, not OK' => [':-(', ':(', ':=('], | |
'Winky smile' => [';-)', ';)', ';=)'], | |
'Laughing out loud, LOL' => [':-D', ':D', ':=D'], | |
'Oh, surprise!' => [':-O', ':O', ':=O'], | |
'I’m worried' => [':-S', ':S'], | |
'Meh, don’t care' => [':-/', ':/'], | |
'I’m angry, grrr!' => ['X-(', 'X(', ':@', ':-@', ':=@', 'X=('], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# Sensu / Nagios check for detecting .ee domains that are about to expire | |
# Uses the JSON HTTP WHOIS API of internet.ee (Estonian TLD registrar). | |
# | |
# JSON API: http://rwhois.internet.ee | |
# Documentation: http://www.eis.ee/registrars/new-registry-system | |
# | |
# Note: This is a quick 30-minute script: untested, with bugs. | |
# | |
# Author: Ando Roots <ando@sqroot.eu> 2015-12-13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use GuzzleHttp\Client; include 'vendor/autoload.php'; define('ROOT', 'https://stash.local'); $sp7a9ef4 = array('API', 'AD', 'AP', 'SERVICE', 'API-UTIL'); $sp33c1bb = array(); foreach ($sp7a9ef4 as $sp0e38ee) { $sp09795d = new Client(); $sp6171a0 = sprintf(ROOT . '/rest/api/1.0/projects/%s/repos', $sp0e38ee); $sp8e6701 = $sp09795d->request('GET', $sp6171a0, array('auth' => array(getenv('LDAP_USER'), getenv('LDAP_PASS')))); $sp1478c4 = json_decode($sp8e6701->getBody(), true); foreach ($sp1478c4['values'] as $spb0932d) { if (!isset($sp33c1bb[$sp0e38ee])) { $sp33c1bb[$sp0e38ee] = array(); } $sp33c1bb[$sp0e38ee][] = $spb0932d['slug']; } } $sp976d5b = array(); foreach ($sp33c1bb as $sp0e38ee => $spf4b9a8) { foreach ($spf4b9a8 as $sp5f4662) { $sp6171a0 = sprintf(ROOT . '/rest/api/1.0/projects/%s/repos/%s/pull-requests', $sp0e38ee, $sp5f4662); $sp09795d = new Client(); $sp8e6701 = $sp09795d->request('GET', $sp6171a0, array('auth' => array(getenv('LDAP_USER'), getenv('LDAP_PASS')))); $sp1478c4 = json_decode($sp8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias commit='git add . && curl --silent https://raw.githubusercontent.com/ngerakines/commitment/master/commit_messages.txt | shuf | head -n 1 | git commit --file -' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MyPCWantsToKillMe | |
* | |
* Teensy 2.0 (Keyboard mode) office prank sketch. | |
* | |
* Plug into victims USB port. The sketch will start with periodically (random intervals) locking | |
* the victims workstation (Ctrl + Alt + L, phase 1) and will then start to output random creepy messages (phase 2). | |
* The messages are typed into whatever text area has focus. Ideally, the victim thinks that his computer has | |
* suddenly gained intelligence and wants to kill him. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# UDEV rules for razer devices | |
# Change script path! | |
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="1532", ATTR{idProduct}=="0015", RUN+="/home/david/bin/razer-connect.sh" | |
ACTION=="remove", SUBSYSTEM=="usb", RUN+="/usr/local/bin/razercfg -B -S1 -s" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A PowerShell script to check the status (online / offline) of NODE-s | |
# Pings each NODE with a ICMP packet to get its status | |
# | |
# Author Ando Roots <ando@sqroot.eu> 2014-03-05 | |
# -------------- CONFIG ------------------- # | |
# Node numbers to ping | |
$NodeList = 11,12,13,14,15,16,17,18,24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# A Pomodoro timer! | |
# Built for the Raspberry Pi | |
# | |
# http://en.wikipedia.org/wiki/Pomodoro_Technique | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_LEDBackpack/Adafruit_7Segment.py | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_LEDBackpack/Adafruit_LEDBackpack.py | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_I2C/Adafruit_I2C.py | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# Show the number of viewers of ERR ETV online TV-channel on a 7-segment LCD | |
# Built for the Raspberry Pi | |
# | |
# http://otse.err.ee/etv/ | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_LEDBackpack/Adafruit_7Segment.py | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_LEDBackpack/Adafruit_LEDBackpack.py | |
# https://github.com/adafruit/Adafruit-Raspberry-Pi-Python-Code/blob/master/Adafruit_I2C/Adafruit_I2C.py | |
# |