Skip to content

Instantly share code, notes, and snippets.

View faloi's full-sized avatar

Federico Aloi faloi

  • Argentina
View GitHub Profile
/* Drop all non-system stored procs */
DECLARE @name VARCHAR(128)
DECLARE @SQL VARCHAR(254)
SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name])
WHILE @name is not null
BEGIN
SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']'
EXEC (@SQL)
def clientes = clientes.findAll { unCliente -> unCliente.getNombre().contains(clienteElegido) }
def entradasDelCliente = []
for(cliente in clientes){
for (entrada in cliente.entradas){
entradasDelCliente.addAll(entrada)
}
}
entradasDelCliente
class Api
doRequest: (options) =>
$.ajax(options).fail @showNotification
showNotification: (jqXHR) =>
message = "#{ jqXHR.statusText }."
window.currentBoard().showNotification
template: message
container: ''
clazz: 'danger'
# Script based on http://newtriks.com/2013/06/11/automating-angularjs-with-yeoman-grunt-and-bower/
# Install dependencies (Yeoman, Grunt, Bower). See http://yeoman.io/
sudo npm install -g yo grunt-cli bower karma generator-angular
# Create project structure using yo
mkdir angularjs-grunt-example && cd $_
yo angular
# Install nodejs dependencies
# Configure terminator to run as default terminal (e.g. CTRL + ALT + T)
gconftool --type string --set /desktop/gnome/applications/terminal/exec terminator
# Configure terminator to launch when "Open in terminal" is clicked using Nautilus
gsettings set org.gnome.desktop.default-applications.terminal exec-arg "-x"
gsettings set org.gnome.desktop.default-applications.terminal exec /usr/bin/terminator
@faloi
faloi / Perro.groovy
Created August 15, 2013 05:26
Ejemplo del uso de properties en groovy
class Perro {
def nombre
def edad
def getSaludo() {
"Hola soy ${nombre}!"
}
def setEdad(nuevaEdad) {
if (nuevaEdad > 100)
public static IEnumerable<Type> GetConcreteSubtypes(this Type anInterface)
{
var types = anInterface.Assembly.GetTypes();
return types.Where(type => (type.IsSubclassOf(anInterface) || type.GetInterfaces().Contains(anInterface)) && !type.IsAbstract);
}
private void AgregarMovimiento(string codigo, string detalle, string numComprobante, DateTime fecha, string tipoMovimiento, string deposito, string subdeposito, string destino, decimal cantidad)
{
if (numComprobante == "")
{
MessageBox.Show("Ingrese un número de comprobante.", "Falta ingresar comprobante",
MessageBoxButtons.OK, MessageBoxIcon.Error);
numeroComprobanteTextBox.Focus();
}
else if ((tipoMovimiento == "Transferencia") && (deposito == destino))
{
@faloi
faloi / 52-np900x4c-clickpad.conf
Created March 31, 2013 03:11
Touchpad configuration for Samsung NP900x-400c. It should be placed in /usr/share/X11/xorg.conf.d
Section "InputClass"
Identifier "np900x4c clickpad"
MatchIsTouchpad "on"
Driver "synaptics"
# Enable the clickpad and set click actions
Option "ClickPad" "1"
Option "ClickFinger1" "1"
Option "ClickFinger2" "3"
Option "ClickFinger3" "2"
@faloi
faloi / azure_publish.ps1
Last active December 14, 2015 07:28
Powershell script used to upload a package to Windows Azure. Requires Azure Powershell to work
Param(
[string]$subscription,
[string]$service,
[string]$storageAccount,
[string]$slot,
[string]$package,
[string]$configuration,
[string]$publishSettingsPath
)