Skip to content

Instantly share code, notes, and snippets.

Aldrien aldrienht

Block or report user

Report or block aldrienht

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
aldrienht / testing_wicked_pdf_with_cucumber
Created Oct 4, 2017
Testing With Cucumber and Wicked PDF
View testing_wicked_pdf_with_cucumber
require 'tempfile'
Then(/^I follow the PDF link "([^"]*)"$/) do |text|
temp_pdf ='pdf')
if Capybara.current_driver == Capybara.javascript_driver
temp_pdf << page.driver.source.force_encoding('UTF-8')
temp_pdf << page.driver.response.body.force_encoding('UTF-8')
aldrienht / gist:f31967e6eba4088324088df55e03a271
Created Dec 7, 2016
Simple Dynamin Morris Bar Chart - Rails
View gist:f31967e6eba4088324088df55e03a271
// JS Code
// Assumed that you already declared libraries needed.
type: "GET",
dataType: 'json',
url: "/en/project_chart", // This is the URL to the API
.done(function( data ) {
if ((typeof data === "undefined" || data === null) || data.length === 0) {
aldrienht / gist:cdedca54a9398bdc6f7a3e12d7a222db
Last active Aug 5, 2016
Matching System Font with your local environment and Amazon Linux
View gist:cdedca54a9398bdc6f7a3e12d7a222db
Step 1: Back up your EC2 System fonts.
cp -r /etc/fonts /etc/fonts.old
Step 2: Migrate your local font via SCP.
scp -r -i file.pem /etc/fonts
Step 3: Reset Font Cache
fc-cache -v | grep err (to check errors)
You can’t perform that action at this time.