Skip to content

Instantly share code, notes, and snippets.

View andresaquino's full-sized avatar
🏠
Working from home

Andrés Aquino andresaquino

🏠
Working from home
View GitHub Profile
@andresaquino
andresaquino / gist:708323
Created November 21, 2010 01:08
Update two or more repositories...
#I update github and gitorious (mi principal trunk is in gitorious)
# w/GitHub
git remote add github git@github.com:username/project.git
# w/Gitorious
git remote add gitorious git@gitorious.org:username/project.git
# and updating
@01-Scripts
01-Scripts / abort_merge.txt
Last active September 24, 2015 15:57
Working with git and github, ssh, console & co.
Abort a (conflicted) merge:
git merge --abort
@fcastellanos
fcastellanos / more_test_events.rb
Created August 12, 2011 00:47
DSL Example in Ruby
def monthly_sales
110 # TODO: read the real number from the database
end
setup do
puts "Setting up target sales"
@target_sales = 100
end
event "monthly sales are suspiciously high" do
@mariochavez
mariochavez / info.md
Created October 28, 2016 17:31
Postgresql
@mariochavez
mariochavez / GIF-Screencast-OSX.md
Created September 13, 2016 20:47 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ball6847
ball6847 / mariadb-swarm.sh
Last active April 14, 2017 08:42
Create mariadb cluster using Docker Swarm
#!/bin/sh
# first, create overlay network to make all of your nodes can to talk to each others.
docker network create -d overlay mariadb-network
# then, create primary node, make sure you create the service with only 1 replica
docker service create \
--name mariadb-master \
--replicas 1 \
--mount target=/var/lib/mysql,source=/vol/mariadb-master,type=bind \
@ashrithr
ashrithr / csr.rb
Created June 20, 2013 05:10
ruby openssl
require 'openssl'
#
# Program to demonstrate Certificate Signing Request using openssl
#
# Create a new key
def gen_key(name)
key = OpenSSL::PKey::RSA.new 1024
file = File.new name, "w"
@Grab('org.quartz-scheduler:quartz:2.1.6')
@Grab('org.slf4j:slf4j-simple:1.7.1')
import org.quartz.*
import org.quartz.impl.*
import org.quartz.jobs.*
import static org.quartz.DateBuilder.*
import static org.quartz.JobBuilder.*
import static org.quartz.TriggerBuilder.*
import static org.quartz.CalendarIntervalScheduleBuilder.*
@melix
melix / bench-string-concat.groovy
Created June 9, 2017 16:42
String concat Groovy
@Grab(group='org.gperfutils', module='gbench', version='0.4.3-groovy-2.4')
String a = 'The quick brown fox'
String b = 'jumps over the lazy dog'
int x = 1
double y = 2
benchmark {
'simple concat' {
String concat = a + ' ' + b + ' ' + x + ' ' + y
@masbog
masbog / libgs_install.sh
Created June 17, 2014 07:50
Installing ghostscript 9 CentOS 6.5 with shared Library
curl -O http://downloads.ghostscript.com/public/ghostscript-9.14.tar.gz &&
tar -xzf ghostscript-9.14.tar.gz &&
cd ghostscript-9.14 &&
./configure &&
make install &&
make so &&
cp ghostscript-9.14/sobin/libgs.so.9.14 /usr/lib &&
ln -s /usr/lib/libgs.so.9.14 /usr/lib/libgs.so &&
mkdir -p /etc/ld.so.conf.d/ &&
echo "/usr/lib/libgs.so" > /etc/ld.so.conf.d/libgs.conf &&