Skip to content

Instantly share code, notes, and snippets.

View faloi's full-sized avatar

Federico Aloi faloi

  • Argentina
View GitHub Profile
procedure Linea(largo, direccion, color) {
repeatWith i in 1..largo {
Poner(color)
Mover(direccion)
}
}
procedure Cuadrado(largo, color) {
repeatWith dir in Norte..Oeste {
Linea(largo, dir, color)
@faloi
faloi / toggle_azure_website_profiling.ps1
Created June 2, 2014 22:41
A workaround to force New Relic to release the DLL on an Azure Website
# AUTHOR:
# @faloi - Federico Aloi
# PURPOSE:
# A workaround to force New Relic to release the DLL on an Azure Website, accomplished by toggling profiling on/off.
# This script must be run before and after the actual deploy, assuming that profiling is enabled at the beginning.
# PRECONDITIONS:
# $azureWebsiteName is an existing Website of the current subscription
# COR_ENABLE_PROFILING is an existent app setting
@faloi
faloi / claseFileSystemViernesNoche.java
Created June 7, 2014 06:12
Posible solucion (super incompleta) del problema del File System. Clase del viernes 7/6/2014
public class Buffer {
int getTamanio()
byte[] getContenido()
}
public class File {
LowLevelFileSystem fileSystem;
int fileDescriptor;
//Prueba 1
//PUT /items/MLA510849033
//Request body
{
"variations": [
{
"id": 6442277435
},
{
@faloi
faloi / makefile
Created June 24, 2014 15:20
Huffman Compressor's Makefile
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init
RM := rm -rf
# All of the sources participating in the build are defined here
-include sources.mk
{
"id": "53aad9cca4d39654293978f9",
"name": "TPI Estado Cursada",
"desc": "",
"descData": null,
"closed": false,
"idOrganization": null,
"invited": false,
"pinned": true,
"starred": true,
-- Foreign keys
use INFORMATION_SCHEMA;
select constraint_name, TABLE_NAME, REFERENCED_TABLE_NAME
from KEY_COLUMN_USAGE
where REFERENCED_TABLE_NAME is not null
-- Count of foreign keys with "FK_" prefix
use INFORMATION_SCHEMA;
select count(*)
from KEY_COLUMN_USAGE

Foreign keys

Rename

-- 1. Just the object name as seen in sys.objects:
sp_rename 'FK_Product_Caetgory', 'FK_Product_Category', 'OBJECT'
 
-- 2. Qualified with  the schema:
sp_rename 'Shopping.FK_Product_Caetgory', 'FK_Product_Category', 'OBJECT'
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001
@faloi
faloi / UnViewModel.java
Created September 8, 2014 02:50
Ejemplo simple del uso de RadioSelector en Arena
package ui;
import org.uqbar.commons.utils.Observable;
import java.util.Arrays;
import java.util.List;
@Observable
public class UnViewModel {
private String nombreSeleccionado;