View generate_key_check.rb
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
require 'openssl' | |
curve='prime256v1' | |
p ::OpenSSL::PKey::EC.new(curve).generate_key |
View send_message.applescript
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 osascript | |
# https://chrispennington.blog/blog/send-imessage-with-applescript/ | |
on run parameters | |
# the number here is the number of seconds | |
set theDelay to 3 | |
# Verify if this can use display names | |
set phoneNumber to "+1 (555) 555-1212" | |
tell application "Messages" | |
set targetBuddy to phoneNumber |
View bundle_info_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
bundle list 2>&1 | sed 's/^ \* \(.*\) (.*)/\1/' | grep -v 'bundle info' | grep -v 'bundle:' | xargs -I {} bundle info {} |
View keep_alive_and_window_mover.ino
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
#include <Keyboard.h> | |
#include <Mouse.h> | |
#include <LiquidCrystal.h> | |
/* | |
Arduino 2x16 LCD - Detect Buttons | |
modified on 18 Feb 2019 | |
by Saeed Hosseini @ Electropeak | |
https://electropeak.com/learn/ |
View keep_alive_with_led_reset_blink.ino
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
#include <Mouse.h> | |
void blinkIfYoureRebooted() { | |
// 200, 400, 600, 800, 1000ms blinks | |
for(int i=1; i<=5; i++) { | |
digitalWrite(LED_BUILTIN, HIGH); | |
delay(200 * i); | |
digitalWrite(LED_BUILTIN, LOW); | |
delay(200 * i); | |
} |
View convert_times
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 | |
require 'time' | |
require 'tzinfo' | |
require 'colorize' | |
def usage | |
puts %q( | |
usage: | |
convert_times {time string to parse, spaces ok} |
View parse_pipedelimited.sql
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
<!-- wp:code --> | |
<pre class="wp-block-code"><code> | |
select list.i, | |
substring_index(substring_index( | |
substring_index( | |
substring_index( | |
'9977034 | e9e82737-db8f-44c0-985b-d004788aa91d | 208 | |
3393402 | aa1cbfe0-a66d-44ac-9b66-bd2369c96e52 | 136 | |
3524174 | 490dbaa0-faed-4773-b3c0-4c979e1b07cb | 250 |
View change_pass.js
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/osascript -l JavaScript | |
// Usage: | |
// export OLDPASS="oldpasswordhere!" | |
// export NEWPASS="newpasswordgoeshere." | |
// get to change password screen in WorkSpace prior to running this script and make sure you're on the "old password" field. | |
// run script without args | |
var app = Application.currentApplication(); | |
app.includeStandardAdditions = true |
View change_pass.applescript
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/osascript | |
# Usage: | |
# export OLDPASS="oldpasswordhere!" | |
# export NEWPASS="newpasswordgoeshere." | |
# get to change password screen in WorkSpace prior to running this script and make sure you're on the "old password" field. | |
# run script without args | |
on sysKeyCode(kc) | |
tell application "System Events" to key code {kc} using {command down} |
View .zlogin
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
function safety_preexec() { | |
# Store the command that we're running. | |
CMD_NAME="$1" | |
} | |
function safety_precmd() { | |
if [[ "$CMD_NAME" =~ 'kubectl config use-context whatever-your-prod-is' ]]; then | |
PROD_TIME=$(date +%s) |
NewerOlder