This file contains hidden or 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
#!/bin/bash | |
# https://luzifer.io/blog/using-lastpass-to-unlock-ssh-keys/ | |
KEY_NAME=$1 | |
if ! ( which lpass > /dev/null ); then | |
echo "LastPass CLI is required." | |
exit 2 | |
fi |
This file contains hidden or 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
# Create a new predicate method | |
# | |
# Eg., 'ABC'.similar?('abc') # true | |
# | |
# Pros: Simple. Intention-revealing. | |
# Cons: No sugar. | |
module CoreExtensions | |
module String | |
def similar?(value) |
This file contains hidden or 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 bash | |
http GET http://pav.linkpc.net:881/cgi-bin/CGIProxy.fcgi \ | |
'usr'=='admin' \ | |
'pwd'=='${FOSCAM_PASSWORD}' \ | |
'cmd'=='setAudioAlarmConfig' \ | |
'isEnable'==1 \ | |
'sensitivity'==1 \ | |
'linkage'==138 \ | |
'triggerInterval'==10 \ |
This file contains hidden or 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 bash | |
http GET http://192.168.10.80:88/cgi-bin/CGIProxy.fcgi \ | |
'usr'=='admin' \ | |
'pwd'=='${FOSCAM_PASSWORD}' \ | |
'cmd'=='setAudioAlarmConfig' \ | |
'isEnable'==0 \ | |
'sensitivity'==1 \ | |
'linkage'==138 \ | |
'triggerInterval'==10 \ |
This file contains hidden or 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
10 3 * * 1,3,5 /tmp/custom.sh |
This file contains hidden or 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
#!/bin/sh | |
# adblocker.sh - by Todd Stein ([email protected]), Saturday, October 25, 2014 | |
# for use on routers running OpenWRT firmware | |
# Periodically download lists of known ad and malware servers, and prevents traffic from being sent to them. | |
# This is a complete rewrite of a script originally written by teffalump (https://gist.github.com/teffalump/7227752). | |
HOST_LISTS=" |
NewerOlder