Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# ------------------------------------------------------------------------------
# SOME INFOS : fairly standard (debian) init script.
# Note that node doesn't create a PID file (hence --make-pidfile)
# has to be run in the background (hence --background)
# and NOT as root (hence --chuid)
#
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts
# INSTALL/REMOVE http://www.debian-administration.org/articles/28
@fotinakis
fotinakis / Jenkins auto-shudown-slaves job
Last active July 6, 2020 08:56
Auto-managed Jenkins slaves on Google Compute Engine
#!/bin/bash
# Have to redirect stderr to stdout here because slave.py uses stderr for output.
~/bin/slave.py list 2>&1 >/dev/null | grep beaker-slave- | while read slave; do
echo
echo "Checking status of $slave..."
# First, check if we can SSH into the host. If we can, then check the process and maybe shut down.
# This makes sure that we don't consider an SSH failure to be reason to shut down the node.
if ssh $slave echo < /dev/null; then
@jdelamater99
jdelamater99 / AmazonSmile_redirect.user.js
Last active June 23, 2024 02:46
AmazonSmile Redirect (Greasemonkey Script)
// ==UserScript==
// @name AmazonSmile Redirect
// @namespace http://jdel.us
// @description Redirect Amazon to AmazonSmile
// @include http://*.amazon.*/*
// @include https://*.amazon.*/*
// @version 0.6
// @grant none
// @run-at document-start
// ==/UserScript==
@jokey2k
jokey2k / sshfilter.sh
Last active April 22, 2024 14:18
Tuned version of sshfilter.sh to allow for ipv6 filtering
#!/bin/bash
# based on script from http://www.axllent.org/docs/view/ssh-geoip
# License: WTFPL
# UPPERCASE space-separated country codes to ACCEPT
ALLOW_COUNTRIES="DE EU GB"
LOGDENY_FACILITY="authpriv.notice"
if [ $# -ne 1 ]; then
echo "Usage: `basename $0` <ip>" 1>&2
@vpetersson
vpetersson / gist:6b1da35edbe3f7dc7ca4
Last active August 12, 2017 01:58
Example on how to create a 'Secret URL' for Nagios in Apache.
# Example from http://www.screenlyapp.com/use-cases/dashboard/nagios.html
ScriptAlias /cgi-bin/nagios3 /usr/lib/cgi-bin/nagios3
ScriptAlias /nagios3/cgi-bin /usr/lib/cgi-bin/nagios3
Alias /nagios3/stylesheets /etc/nagios3/stylesheets
Alias /nagios3 /usr/share/nagios3/htdocs
<Location /abc123>
# Hard code credentials
AuthBasicFake nagiosadmin nagiosadmin

KC60 Keyboard end-user tips, tricks, programming notes, etc.

Leimi's note: removed lots of stuff from the original gist of scottjl, (thanks to him by the way!), as in the end some wasn't useful for me. If you are intestered, go check the gist revisions.

The KC60 is kinda like a premade GH60 that was first sold on Massdrop during summer 2015.
It runs on TMK firmware, or something based on it at least (not sure this is the real source for the keyboard but it seems it is), which means it's heavily programmable.
There is a GUI tool (the source of this tool seems to be here) and a command-line tool to ease up the process of programming the board.
**Go check this great article on Key

@Lectral13
Lectral13 / gist:88548a2d19f7a45c5469
Last active April 22, 2021 12:31
KC60 Mechanical Keyboard info
This is the list of information compiled by scotjl off the Massdrop listed below.
Original product drop - https://www.massdrop.com/buy/kc60-mechanical-keyboard Configurator web page - http://123.57.250.164:9128/
Flashing information - https://www.keychatter.com/2015/07/05/programming-the-kc60/ https://github.com/tmk/tmk_keyboard https://geekhack.org/index.php https://github.com/kairyu/tkg-toolkit
Reviews - livingspeedbump - https://www.keychatter.com /2015/07/01/review-kc60-3/
USB cable sources -
javascript:void( (function(){ var current_location=location.href.replace(/^http\:\/\/(.*)$/,"$1"); var current_location=current_location.split("?")[0]; location.href="http://www.google.com/search?q=c..."+escape(current_location); })())
@ruario
ruario / intro-latest-widevine.md
Last active January 29, 2024 07:53
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.

With the release of Vivaldi 2.2, this page is now obsolete and unmaintained. Widevine is fetched automatically on post install of our official packages. The information below and the script are left for historical reasons but will not be updated.

If you are using something newer than Vivaldi 2.2, you should not be using this script as there is simply no need. Any need you think you have for it would be a bug IMHO and thus should be logged in a bug report. Before you do so however, you should also checkout the Vivaldi help page on Widevine, on Linux


Summary

A bunch of people asked how they could use this script with pure Chromium on Ubuntu. The following is a quick guide. Though I still suggest you at least try Vivaldi. Who knows, you might like it. Worried about proprietary componants? Remember that libwidevinecdm.so is a b

@sebastienvercammen
sebastienvercammen / Code.gs
Last active March 9, 2022 09:58
Nintendo PTC Account Verifier for Gmail v2 with CORS proxy (via Google Scripts & jQuery)
/*
Automatically click all "Verify your email" links in the welcome e-mail from
Nintendo Pokémon Trainer Club's signup e-mails.
Only unread emails in inbox will be processed.
All processed e-mails will be marked as read if verification was successful,
and optionally moved to trash if it's enabled in your settings.
How to use:
1. Login to Gmail