Skip to content

Instantly share code, notes, and snippets.

View 155martinmoreno's full-sized avatar

Martín Moreno 155martinmoreno

View GitHub Profile
@155martinmoreno
155martinmoreno / gitfilesizehistory.sh
Created December 4, 2019 09:44
Shell to see lines count history of a file added to git.
#!/bin/sh
#
# list the given file's filesize next to each commit
# usage: git-fs-history path/to/file
#
if [ $# -ne 2 ]; then
echo "Error: invalid number of arguments."
exit 1
const { Worker, isMainThread, workerData } = require('worker_threads');
let currentVal = 0
let intervals = [10,10, 10]
var shared = 0
function counter(id, i){
shared = i
console.log("[", id, "]", "Shared: " + shared)
return i;
@155martinmoreno
155martinmoreno / .bash_profile
Last active September 10, 2015 15:43
A more useful .bash_profile
function setjdk() {
if [ $# -ne 0 ]; then
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin'
if [ -n "${JAVA_HOME+x}" ]; then
removeFromPath $JAVA_HOME
fi
export JAVA_HOME=`/usr/libexec/java_home -v $@`
export PATH=$JAVA_HOME/bin:$PATH
fi