This file contains 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
class Perro { | |
def nombre | |
def edad | |
def getSaludo() { | |
"Hola soy ${nombre}!" | |
} | |
def setEdad(nuevaEdad) { | |
if (nuevaEdad > 100) |
This file contains 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
# 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 |
This file contains 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
# 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 |
This file contains 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
class Api | |
doRequest: (options) => | |
$.ajax(options).fail @showNotification | |
showNotification: (jqXHR) => | |
message = "#{ jqXHR.statusText }." | |
window.currentBoard().showNotification | |
template: message | |
container: '' | |
clazz: 'danger' |
This file contains 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
def clientes = clientes.findAll { unCliente -> unCliente.getNombre().contains(clienteElegido) } | |
def entradasDelCliente = [] | |
for(cliente in clientes){ | |
for (entrada in cliente.entradas){ | |
entradasDelCliente.addAll(entrada) | |
} | |
} | |
entradasDelCliente |
This file contains 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
ANTIGEN=$HOME/bin | |
# Example aliases | |
alias zshconfig="st ~/.zshrc" | |
alias gitconfig="st ~/.gitconfig" | |
alias delete_merged_branches="git branch --merged | grep -v '\*' | xargs -n 1 git branch -d" | |
alias pbcopy='xsel --clipboard --input' | |
alias pbpaste='xsel --clipboard --output' | |
alias install='sudo apt-get install' |
This file contains 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
/* 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) |
This file contains 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
template<class TYPE> | |
NodoListaSE <TYPE> * NodoListaSE <TYPE>::Pop () | |
{ | |
NodoListaSE <TYPE> *ultimo = this->ObtenerUltimo(); | |
NodoListaSE <TYPE> *anteultimo = this->BuscarNodoAnteriorA(ultimo); | |
anteultimo.sgte = 0; | |
return ultimo; | |
} |
This file contains 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
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) |
This file contains 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
# 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 |