This file contains hidden or 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 gback() | |
{ | |
#Setup backup dir name | |
name=`date +"%I:%M:%S"` | |
date=`date +"%d-%m-%y"` | |
dir="/home/"$USER"/Desktop/store/$date/$name" | |
mkdir -p $dir | |
#Store git diff result for reference | |
echo "Generate: git diff results.." |
This file contains hidden or 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 grh() | |
{ | |
#Pass any arbitary argument to this command ( e.g. grh 1 ) to skip backup | |
if [ "$1" ] | |
then | |
echo "Skip backup? (y/n): " | |
read answer | |
if [ "$answer" != "${answer#[Yy]}" ] ;then | |
echo "Run: git reset --hard without creating backup" | |
git reset --hard |
This file contains hidden or 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
// a minimal http server | |
package main | |
import ( | |
"fmt" | |
"net/http" | |
) | |
func handler(w http.ResponseWriter, req *http.Request) { |
This file contains hidden or 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" | |
"io/ioutil" | |
"net/http" | |
"os" | |
) | |
func main() { |
This file contains hidden or 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" | |
func main() { | |
fmt.Println("Hello, World") | |
} |