sudo wget https://storage.googleapis.com/golang/go1.4.2.linux-amd64.tar.gz
tar -xzf go1.4.2.linux-amd64.tar.gz
export GOROOT=PATH_WHERE_YOU_EXTRACT_GO
export PATH=$PATH:$GOROOT/bin
export GOBIN=$GOROOT/bin
mkdir ~/golang/
export GOPATH=~/golang/
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
import 'dart:convert'; | |
int covertToAmt(var l){ | |
var amt = 0; | |
for (int i = 0, j=l.length-1; i < l.length; i++, j--) { | |
amt+=((l[j]<<(i*8))); | |
} | |
return amt; | |
} |
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
int Hexascii(unsigned char *dest, unsigned char *src, int size) | |
{ | |
int i; | |
if (size > 0) | |
{ | |
for (i = 0; i < (size / 2); i++) | |
{ | |
*(dest + (2 *i)) = ((*(src + i) &0xF0) >> 4) + 0x30; |
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 | |
lsof -a -p $1 -d cwd -n | tail -1 | awk '{print $NF}' |
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
# redirect output and errors into file output.log: | |
nohup some_command > output.log 2>&1& | |
# abbreviated syntax for bash version >= ver.4: | |
nohup some_command &> output.log |
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
open terminal | |
defaults write com.apple.finder AppleShowAllFiles YES |
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
/* | |
* To change this license header, choose License Headers in Project Properties. | |
* To change this template file, choose Tools | Templates | |
* and open the template in the editor. | |
*/ | |
package amounttotext; | |
/** | |
* | |
* @author san |
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 config --global http.proxy http://proxyuser:[email protected]:8080 | |
change proxyuser to your proxy user | |
change proxypwd to your proxy password | |
change proxy.server.com to the URL of your proxy server | |
change 8080 to the proxy port configured on your proxy server | |
If you decide at any time to reset this proxy and work without proxy: | |
Command to use: | |
git config --global --unset http.proxy |
NewerOlder