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
memcached_return cache_create(const char* ip, int port, int max_instances) { | |
memcached_server_st *server = NULL; | |
memcached_return ret_cache; | |
connections = sync_queue_create(); | |
server = memcached_server_list_append(server, ip, port, &ret_cache); | |
int i; | |
for (i = 0; i < max_instances; i++) { | |
memcached_st* cache = memcached_create(NULL); |
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
NAME=$1 | |
EMAIL=$2 | |
done_message() { | |
echo "Done!" | |
echo "" | |
} | |
if [ -z "$1" ] || [ -z "$2" ]; then | |
echo "Couldn't run script!" |
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
SSH_ENV=$HOME/.ssh/environment | |
function start_agent { | |
echo "Initialising new SSH agent..." | |
/usr/bin/ssh-agent | sed 's/^echo/#echo/' > ${SSH_ENV} | |
echo succeeded | |
chmod 600 ${SSH_ENV} | |
. ${SSH_ENV} > /dev/null | |
/usr/bin/ssh-add; | |
} |
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
[color] | |
ui = true | |
[user] | |
name = Federico Aloi | |
email = federico.aloi@gmail.com | |
[alias] | |
all = commit -a -m | |
amend = commit --amend --no-edit | |
adduntracked = !git add $(git ls-files -o --exclude-standard) | |
discard = checkout -- |
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
public class ActionMock<T> | |
{ | |
private int TimesExecuted { get; set; } | |
public Action<T> Action { get; private set; } | |
public ActionMock() | |
{ | |
this.Action = _ => this.TimesExecuted++; | |
} |
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
require 'Nokogiri' | |
xmlWildcard = "C:/Users/feder_000/Documents/Workspace/parsimotion/pages/**/*.xml" | |
allXmls = Dir[xmlWildcard] | |
allXmls.each{ |xml| | |
doc = Nokogiri::XML(open(xml)) | |
begin | |
doc.search('Page').attribute('Version').remove |
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
Param( | |
[string]$subscription, | |
[string]$service, | |
[string]$storageAccount, | |
[string]$slot, | |
[string]$package, | |
[string]$configuration, | |
[string]$publishSettingsPath | |
) |
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
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" |
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
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)) | |
{ |
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
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); | |
} |
OlderNewer