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 | |
# fun script I made in an hour to play with demoing various commands. | |
# Should be filed under stupid-bash-tricks | |
clear | |
echoEval () { | |
echo -e " =========================================" | |
cmd=$* | |
echo -e "Evaluation the command :\n \t\t $cmd \n ==============================" |
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
package main | |
import "fmt" | |
import "reflect" | |
var fp = fmt.Println | |
func main() { | |
methodExpressionPlay2() |
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 logProductInfo() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getDataRange().getValues(); | |
// var today = new Date(); | |
var today = data[0][7]; | |
var events = CalendarApp.getDefaultCalendar().getEventsForDay(today); | |
events.forEach(function(e){ |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
// "github.com/davecgh/go-spew/spew" | |
"github.com/recursionpharma/go-csv-map" | |
"io/ioutil" | |
"net/http" | |
"net/url" |
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: gitdiff {another branch} | |
# will show the files which are different between the branch you are currently on | |
# and the other branch | |
# I use it to remind myself which files I have been editing | |
# TODO: pump it into quickfix in vim | |
while getopts ":h:" opt; do | |
case ${opt} in | |
h) |
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 | |
#will remove the file and all traces of it from your git history. | |
# Good for removing the accidental large bin file | |
# or maybe some sensitive data you accidentally committed | |
git filter-branch --force --index-filter 'git rm --cached --ignore-unmatch THEFILENAME HERE' --prune-empty --tag-name-filter cat -- --all |