Installing mysql2
gem errors on MacOS Mojave.
Make sure openssl
is installed on Mac via Homebrew.
brew install openssl
#!/bin/bash | |
# $1 = # of seconds | |
# $@ = What to print after "Waiting n seconds" | |
countdown() { | |
secs=$1 | |
shift | |
msg=$@ | |
while [ $secs -gt 0 ] | |
do | |
printf "\r\033[KWaiting %.d seconds $msg" $((secs--)) |
*/15 * * * * $(which zsh) -lc 'export PATH=/usr/local/bin:/usr/local/sbin:$PATH; eval "$(rbenv init -)"; ruby SOME_SCRIPT.rb' |
# adapted from https://blog.jourdant.me/post/3-ways-to-download-files-with-powershell | |
$version = "14.4.3" | |
$url = "http://download3.portableapps.com/portableapps/pacplatform/PortableApps.com_Platform_Setup_$version.paf.exe" | |
$output = "$home\Desktop\paf.exe" | |
Import-Module BitsTransfer | |
Start-BitsTransfer -Source $url -Destination $output |
@echo off | |
"C:\Program Files\letsencrypt-win-simple\letsencrypt.exe" --renew --baseuri "https://acme-v01.api.letsencrypt.org/" | |
REM run powershell script, bypassing security warnings for 3rd-party script | |
powershell -ExecutionPolicy bypass -File "C:\Program Files\letsencrypt-win-simple\RDS_INSTALL_CERT.ps1" |
require 'openssl' | |
class String | |
def encrypt(key) | |
cipher = OpenSSL::Cipher::Cipher.new('DES-EDE3-CBC').encrypt | |
cipher.key = Digest::SHA1.hexdigest key | |
s = cipher.update(self) + cipher.final | |
s.unpack('H*')[0].upcase | |
end |
{"date":"2016-02-12","deliveries":{"100197465":{"assign_to":"Azhar","delivery_time":"3pm - 6pm","postal_code":"576962","dispatched":true},"100197161":{"assign_to":"William","delivery_time":"9am - 12pm","postal_code":"150092","dispatched":true},"100197308":{"assign_to":"Azhar","delivery_time":"9am - 12pm","postal_code":"531984","dispatched":true},"100197033":{"assign_to":"William","delivery_time":"12pm - 3pm","postal_code":"138533","dispatched":true},"100197576":{"assign_to":"Steven","delivery_time":"3pm - 6pm","postal_code":"791447","dispatched":true},"100196820":{"assign_to":"Khoo","delivery_time":"6pm - 9pm","postal_code":"680682","dispatched":true},"100197198":{"assign_to":"Khoo","delivery_time":"9am - 12pm","postal_code":"680295","dispatched":true},"100197673":{"assign_to":"Azhar","delivery_time":"6pm - 9pm","postal_code":"760235","dispatched":true},"FL007456":{"assign_to":"William","delivery_time":"12pm - 3pm","postal_code":"","dispatched":true},"100197680":{"assign_to":"Hanapiah","delivery_time":"12pm - |
##################################################### | |
# | |
# Provided by the Magento Support Center | |
# http://magentosupport.help/knowledgebase/configuring-nginx-to-work-with-magento-advanced/ | |
# | |
# Your Magento Tutorial specialists | |
# | |
server { | |
listen *:8080; | |
server_name fanatik.redrokk.com www.fanatikbike.com fanatikbike.com; |
<form accept-charset="UTF-8" action="/payment" class="cardInfo" method="post"> | |
<fieldset class="cardInfo__cardDetails"> | |
<div class="form-row cardInfo__cc-num"> | |
<label for="cc-num"><abbr title="required">*</abbr><span>Card Number</span></label> | |
<div class="cc-num__wrap"> | |
<!-- using type="tel" because type="number" doesn’t pass HTML5 form validation with jQuery.payment formatting --> | |
<input id="cc-num" type="tel" class="paymentInput cc-num" placeholder="•••• •••• •••• ••••" autocompletetype="cc-number" required="required"> | |
<span class="card" aria-hidden="true"></span> |
It's a common misconception that [William Shakespeare][1] and [Miguel de Cervantes][2] died on the same day in history - so much so that UNESCO named April 23 as [World Book Day because of this fact][3]. However because England hadn't yet adopted [Gregorian Calendar Reform][4] (and wouldn't until [1752][5]) their deaths are actually 10 days apart. Since Ruby's Time
class implements a [proleptic Gregorian calendar][6] and has no concept of calendar reform then there's no way to express this. This is where DateTime
steps in:
>> shakespeare = DateTime.iso8601('1616-04-23', Date::ENGLAND)
=> Tue, 23 Apr 1616 00:00:00 +0000
>> cervantes = DateTime.iso8601('1616-04-23', Date::ITALY)
=> Sat, 23 Apr 1616 00:00:00 +0000