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
/** | |
* Main class for the Cloud Storage API command line sample. | |
* Demonstrates how to make an authenticated API call using OAuth 2 helper classes. | |
*/ | |
public class StorageSample { | |
/** | |
* Be sure to specify the name of your application. If the application name is {@code null} or | |
* blank, the application will log a warning. Suggested format is "MyCompany-ProductName/1.0". | |
*/ |
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
public class FileCopyWithProgress { | |
public static void main(String[] args) throws Exception { | |
String localSrc = args[0]; | |
String dst = args[1]; | |
InputStream in = new BufferedInputStream(new FileInputStream(localSrc)); | |
Configuration conf = new Configuration(); | |
FileSystem fs = FileSystem.get(URI.create(dst), conf); | |
OutputStream out = fs.create(new Path(dst), new Progressable() { | |
public void progress() { | |
System.out.print("."); |
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
DOCKER_VERSION=0.7 | |
DATA_DIR="__data" | |
POSTGRES_VERSION=9.3 | |
PORT=5432 | |
.PHONY: docker-check docker-version postgres | |
docker-check: | |
@command -v docker >/dev/null 2>&1 || \ | |
{ echo >&2 "Docker needs to be installed and on your PATH. Aborting."; exit 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
0.install 32 bit libraries on ubuntu | |
sudo apt-get update | |
sudo apt-get install libstdc++6:i386 lib32z1 lib32ncurses5 lib32bz2-1.0 libxext6:i386 libxrender1:i386 libxtst6:i386 libxi6:i386 | |
1.Install 32 bit chrome | |
2.Install 32 bit jre | |
sudo mkdir -p -v /opt/java/jre/32 |
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 java.net.InetAddress; | |
import java.net.UnknownHostException; | |
public class dns { | |
public static void main(String[] args) throws UnknownHostException { InetAddress addr = InetAddress.getLocalHost(); | |
System.out.println( | |
String.format( | |
"IP:%s hostname:%s canonicalName:%s", | |
addr.getHostAddress(), // The "default" IP address | |
addr.getHostName(), // The hostname (from gethostname()) | |
addr.getCanonicalHostName() // The canonicalized hostname (from resolver) |
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
cntlm -T /home/186946/ntlm.log -s -v -c /etc/cntlm.conf |
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
http://blog.mafr.de/2010/08/01/maven-archetype-hadoop/ |
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
1. two data sets A and B | |
24 hrs data | |
A | |
entity,joinky,timestamp | |
google.com,1234,12:25 |
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
http://apple.stackexchange.com/questions/69549/reversing-some-usr-local-damage | |
http://apple.stackexchange.com/questions/102806/how-to-recover-from-chown-r-user-usr | |
http://superuser.com/questions/591108/how-can-i-restore-the-permissions-of-my-usr-folder |
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
Learning to learn | |
https://www.youtube.com/watch?v=vd2dtkMINIw |