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
# Keyboard event codes 0x00 found at: https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_code_values | |
# Block using left shift for left half of the keyboard | |
lshift - 0x32 : osascript -e "beep" # ` | |
lshift - 1 : osascript -e "beep" | |
lshift - 2 : osascript -e "beep" | |
lshift - 3 : osascript -e "beep" | |
lshift - 4 : osascript -e "beep" | |
lshift - 5 : osascript -e "beep" | |
lshift - 6 : osascript -e "beep" |
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
// https://www.benlcollins.com/apps-script/api-tutorial-for-beginners/ | |
function main() { | |
let accessToken = "YOUR_ACCESS_TOKEN" | |
let fields = "account_id,account_name,date_start,date_stop,impressions,spend" | |
let accountIds = getAccountIds(accessToken) | |
let jsonData = getAdInsights(accountIds, fields, accessToken) | |
let sheet = SpreadsheetApp.getActiveSheet() | |
let dataKeys = Object.keys(jsonData[0]) | |
let dataArray = convertToArray(dataKeys, jsonData) | |
dataArray.unshift(dataKeys) |
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/local/bin/python3 | |
import base64 | |
import hashlib | |
import hmac | |
import json | |
import os | |
import requests | |
import time | |
import urllib.parse |
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
#!/bin/bash | |
USAGE_TEXT="Usage: locker.sh <command> target | |
Commands: | |
lock Expects target to be a directory. This directory will be compressed | |
with a password using 7z removing the original directory afterwards. | |
unlock Expects target to be a 7z compressed file. Unlocks the given |
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
#!/bin/bash | |
if [ -z "$1" ] | |
then | |
TAG="stable" | |
else | |
TAG=$1 | |
fi | |
TMP_FILE=nvim-macos.tar.gz |
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
# For use when you need trace level logs | |
status = error | |
name = PropertiesConfig | |
filters = threshold | |
filter.threshold.type = ThresholdFilter | |
filter.threshold.level = trace | |
appenders = console |
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
# delete till end of line | |
dt$ |
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
find main | grep -P 'Rule.java$' > testfile | |
sed 's/main/test/g' testfile | sed 's/Rule\.java/RuleTest\.java/g' > final | |
cat final | xargs -L 1 mkdir -p |
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 pcat='pygmentize -g' | |
alias chrome='google-chrome-stable' | |
alias gfr='git svn fetch; git svn rebase' | |
alias work='cd ~/workspace/' | |
alias home='cd ~' | |
alias bprops='vim /etc/cwan/titan/basic.properties' | |
alias bpropsd2='vim /etc/cwan/titan/d2/basic.properties' | |
alias rm='rm -v' | |
alias mv='mv -v' | |
alias cp='cp -v' |
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
<code_scheme name="Titan (hand entered)" version="173"> | |
<option name="SOFT_MARGINS" value="120" /> | |
<JavaCodeStyleSettings> | |
<option name="SPACE_AROUND_TYPE_BOUNDS_IN_TYPE_PARAMETERS" value="false" /> | |
<option name="BLANK_LINES_AROUND_INITIALIZER" value="0" /> | |
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" /> | |
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="99" /> | |
</JavaCodeStyleSettings> | |
<SqlCodeStyleSettings version="2"> | |
<option name="ALIAS_CASE" value="1" /> |
NewerOlder