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
#!/bin/bash | |
# ./s3check /user/raw/2016 | |
# it will check recursivly check all files on that path on S3, with the equivalent path on s3. | |
# if the file is not on s3 it will created with compresion | |
if [ -z "$1" ]; then | |
echo usage: $0 directory | |
exit | |
fi | |
hdfsDir=$1 |
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
using System; | |
using System.Collections.Generic; | |
using System.Diagnostics; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Net.Http; | |
using System.Reactive.Linq; | |
using System.Text; | |
using System.Threading; |
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
public static class ReflectionExtensions | |
{ | |
/// <summary> | |
/// Turns into string all the properties of an object. | |
/// The idea of this method is to make an object more readable. The idea of this method is to be typically used in logs, to know the full status of an object. | |
/// </summary> | |
/// <param name="obj">Object to get the properties of</param> | |
/// <param name="tab">The tab to print the object</param> | |
/// <returns>Object properties in readable string format</returns> | |
public static string PropertiesToString(this object obj, int tab = 0) |
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
using System; | |
using System.Threading; | |
static class Program { | |
static void Main() { | |
Console.Write("Performing some task... "); | |
using (var progress = new ProgressBar()) { | |
for (int i = 0; i <= 100; i++) { | |
progress.Report((double) i / 100); |
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
git config --global core.autocrlf true | |
git config --global core.safecrlf true |
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
var x, o1, o2, r1, r2, r3; | |
x = 4; | |
o1 = {x: 2}; | |
o2 = {x: 7}; | |
f = function(m, n) {return m * n * this.x;}; | |
r1 = f(3, 1)); | |
r2 = f.call(o1,3, 1)); | |
r3 = f.apply(o2,[3, 1])); |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="json to html form" /> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js"></script> | |
<meta charset=utf-8 /> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
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
git remote update | |
git checkout -t -b nameBranch remote/branch | |
git branch -vv (to check, two Vs) |
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
var injector = angular.injector(['module1', module2, 'ng']); | |
var service = injector.get("serviceName"); |
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
//More info: http://javascript.crockford.com/private.html | |
function Vehicle() { | |
this.pepe = function(){ | |
console.log('pepe'); | |
}; | |
} | |
Vehicle.prototype.drive = function () { |