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 | |
branch_name=$(git rev-parse --symbolic-full-name --abbrev-ref HEAD); | |
echo "create new branch and reset prev of $branch_name"; | |
git checkout -b $1 | |
git checkout $branch_name | |
# reset pervious version | |
git reset --hard HEAD~1 | |
git checkout $1 |
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 | |
( | |
IFS=$'\n' | |
for y in $(ls $1) | |
do | |
mv $1/`echo $y | sed 's/ /\\ /g'` $1/`echo "$y" | sed 's/ /_/g'` | |
done | |
) |
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 | |
# unprotect multiple pdf files in a directory with qpdf 10Jan20 | |
# run the script from the same directory as the files | |
if [ -d output ]; | |
then | |
echo "output directory exists" | |
else | |
mkdir output | |
fi |
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 | |
# | |
# Place this script into your script folder and use like this: | |
# | |
# ./script/wrap-env.sh .env $(npm bin grunt)/grunt serve | |
# | |
# Your .env file must have exports in it, not just a list of variable like Docker env files work | |
# | |
usage="$(basename "$0") [-h] .env_file command [arg ...] |
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
var talon = require("talon"); | |
var extractSignature = talon.signature.bruteforce.extractSignature; | |
var planer = require('planer'); | |
const cheerio = require('cheerio') | |
// https://github.com/PrettyHotProgrammer/mandrill-inbound-parser/blob/master/mandrill-inbound-parser.js | |
// mandrill_events%3D%5B%7B%22event%22%3A%22inbound | |
const parse = function(inboundMsg) { | |
if (inboundMsg.includes('mandrill_events=%5B%7B%22event%22%3A%22inbound')) { | |
return decodeURIComponent(inboundMsg) |
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 logPeople1() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getDataRange().getValues(); | |
for (var i = 0; i < data.length; i++) { | |
Logger.log('name: ' + data[i][0]); | |
} | |
} | |
function logPeople2() { | |
var sheet = SpreadsheetApp.getActiveSheet(); |
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
// 0. create function called getNameSummary: | |
// 1. get ui | |
// 2. concat string and variable = 'string' + x | |
// 3. newline = '\n' | |
// 4. ui.alert | |
// 5. build from logPeople3 function | |
// 6. logPeople3 function accpet variable sheet passed from 'getNameSummary' | |
function getNameSummary() { | |
var ui = SpreadsheetApp.getUi(); | |
var result = "" |
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
# start from end | |
streamlink -o [name].ts [URL] best | |
# start from very first | |
streamlink --hls-live-restart -o [name].ts [URL] best | |
# start from offest from end | |
streamlink --hls-start-offset [HH:MM:SS] -o [name].ts [URL] best |
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
git log --no-merges --format="%cd" --date=short | sort -u -r | while read DATE ; do | |
echo | |
echo [$DATE] | |
GIT_PAGER=cat git log --no-merges --format=" * %s" --since=$DATE --until=$NEXT | |
NEXT=$DATE | |
done |
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
Game 1 Mike 3 : 0 Eric | |
Game 2 Mike 3 : 1 Eric | |
Game 3 Mike 1 : 3 Eric | |
Offense Scale: | |
3 = 95 | |
2 = 80 | |
1 = 70 | |
0 = 0 |
NewerOlder