Skip to content

Instantly share code, notes, and snippets.

View faloi's full-sized avatar

Federico Aloi faloi

  • Argentina
View GitHub Profile
@faloi
faloi / push_git_repos.sh
Last active August 29, 2015 14:06
Scans all Git repositories at the given path and outputs those who have uncommited changes
#!/bin/bash
# Update all git directories below current directory or specified directory, asking for confirmation
function ask_yes_or_no() {
read -p "$1 ([y]es or [N]o): "
case $(echo $REPLY | tr '[A-Z]' '[a-z]') in
y|yes) echo "yes" ;;
*) echo "no" ;;
esac
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
@faloi
faloi / .classpath
Created October 1, 2014 21:34
Eclipse files generated by the Gradle plugin, using https://github.com/oehme/xtend-gradle-plugin + Android
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="output" path="bin"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER" exported="true"/>
</classpath>
@faloi
faloi / Main.java
Last active August 29, 2015 14:07
Workspace para probar conceptos de programacion concurrente de forma simple
package edu.unq.pconc;
import java.util.Random;
import java.util.concurrent.Semaphore;
public class Main {
public static void main(String[] args) {
Semaphore semC = new Semaphore(0);
Semaphore semE = new Semaphore(0);
Semaphore semR = new Semaphore(0);
it "puede crear metodos para mensajes faltantes en todos los descendientes" do
Salchicha = Class.new(Perro)
lassie = Perro.new
lassie.ladrar
lassie.ladrar
Perro.crear_metodos_para_mensajes_faltantes(2)
expect(lassie.ladrar).to eq("Soy un Perro y me estan enviando el mensaje ladrar")
@Test
public void puedeInstanciarseUnaLambdaPorElNombreDeSuClase() throws ClassNotFoundException, IllegalAccessException, InstantiationException {
Function<Integer, Integer> lambda = (num) -> num * 2;
Object lambda2 = Class.forName(lambda.getClass().getName()).newInstance();
assertEquals(lambda.getClass(), lambda2.getClass());
}
observeOnScope $scope, "settings.parsimotionToken"
.filter ({newValue}) -> newValue?
.map ({newValue}) -> new Producteca newValue
.subscribe (producteca) ->
$scope.user = producteca.user()
$scope.priceLists = producteca.priceLists()
$scope.warehouses = producteca.warehouses()
create table Calificacion (
id bigint generated by default as identity (start with 1),
critica varchar(255),
puntaje integer not null,
partidoJugado_id bigint,
primary key (id)
)
create table Equipo1 (
Partido_id bigint not null,
package org.unq.epers.rentauto.dbutils
import java.io.FileInputStream
import java.io.FileNotFoundException
import java.util.Properties
import org.eclipse.xtend.lib.annotations.Accessors
@Accessors
class Credentials {
String user
@faloi
faloi / new.json
Last active August 29, 2015 14:22
Gobstones AST
{
"children": [
"program",
{
"children": [
{
"children": [
"import",
"un identificador con may\u00fascula \"Biblioteca\"",
{