Skip to content

Instantly share code, notes, and snippets.

Jordano Moscoso Xosmond

View GitHub Profile
IronicBadger / bash_aliases
Last active Jun 23, 2020
Lets Encrypt Reverse Proxy Files
View bash_aliases
alias dcp='docker-compose -f /opt/docker-compose.yml '
alias dcpull='docker-compose -f /opt/docker-compose.yml pull --parallel'
alias dcplogs='docker-compose -f /opt/docker-compose.yml logs -tf --tail="50" '
alias df='df -h -x aufs -x tmpfs -x udev'
alias editle='sudo vi /opt/appdata/letsencrypt/nginx/site-confs/default'
maxivak /
Last active Jun 20, 2020
Sending emails with ActionMailer and Sidekiq

Sending emails with ActionMailer and Sidekiq

Send email asynchroniously using Sidekiq.


Create your mailer us usual:

dmp1ce / vultr-ubuntu-15.04-configure
Last active Nov 13, 2017
Configure Ubuntu 15.04 for docker-compose and decompose on
View vultr-ubuntu-15.04-configure
# To run from shell:
# bash <(curl -sSL
do_config() {
# Make sure to run as root
user="$(id -un 2>/dev/null || true)"
if [ "$user" != 'root' ]; then
notozeki / Makefile
Last active Mar 5, 2020
An example Ruby extension written in Crystal
View Makefile
CRYSTAL = crystal
UNAME = "$(shell uname -ms)"
LIBRARY_PATH = $(shell brew --prefix crystal-lang)/embedded/lib
LIBS = -levent -lpcl -lpcre -lgc -lpthread
LDFLAGS = -Wl,-undefined,dynamic_lookup
TARGET = crystal_example_ext.bundle
$(TARGET): crystal_example_ext.o
$(CC) -bundle -L$(LIBRARY_PATH) -o $@ $^ $(LIBS) $(LDFLAGS)
jcieslar / selectize_spec.rb
Created Mar 19, 2015
Capybara and selectize
View selectize_spec.rb
page.execute_script("$('.selectize-input input').val('ber')")
sleep 0.5
page.execute_script("$('.selectize-input input').keyup()")
sleep 0.5
tiagoamaro /
Last active Mar 16, 2019
TemporaryJam / Howto convert a PFX to a seperate .key & .crt file
Last active Feb 27, 2020
How to convert a .pfx SSL certificate to .crt/key (pem) formats. Useful for NGINX
View Howto convert a PFX to a seperate .key & .crt file
`openssl pkcs12 -in [yourfile.pfx] -nocerts -out [keyfile-encrypted.key]`
What this command does is extract the private key from the .pfx file. Once entered you need to type in the importpassword of the .pfx file. This is the password that you used to protect your keypair when you created your .pfx file. If you cannot remember it anymore you can just throw your .pfx file away, cause you won’t be able to import it again, anywhere!. Once you entered the import password OpenSSL requests you to type in another password, twice!. This new password will protect your .key file.
Now let’s extract the certificate:
`openssl pkcs12 -in [yourfile.pfx] -clcerts -nokeys -out [certificate.crt]`
rxaviers / gist:7360908
Last active Jul 10, 2020
Complete list of github markdown emoji markup
View gist:7360908


:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
ainoya / remote_sudo.rb
Created Jun 13, 2013
Execute remote sudo command with net-ssh
View remote_sudo.rb
#!/usr/bin/env ruby
require 'net/ssh'
require 'highline/import'
def get_password
ask( "Enter Password: " ) {|q| q.echo = '*'}
def remote_sudo host, ssh_user, command, opts={}
them0nk / rspec_rails_cheetsheet.rb
Created Mar 23, 2012
Rspec Rails cheatsheet (include capybara matchers)
View rspec_rails_cheetsheet.rb
@user.should have(1).error_on(:username) # Checks whether there is an error in username
@user.errors[:username].should include("can't be blank") # check for the error message
response.should render_template(:index)
response.should redirect_to(movies_path)
You can’t perform that action at this time.