SELECT DISTINCT column_name FROM Table name
mysql -h yourhostname -u username -p databasename < yoursqlfile.sql
CREATE USER 'newuser'@'localhost' IDENTIFIED BY 'password';
!#/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 |
#!/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) |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
// "github.com/davecgh/go-spew/spew" | |
"github.com/recursionpharma/go-csv-map" | |
"io/ioutil" | |
"net/http" | |
"net/url" |
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){ |
package main | |
import "fmt" | |
import "reflect" | |
var fp = fmt.Println | |
func main() { | |
methodExpressionPlay2() |
#!/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 ==============================" |