#!/bin/bash | |
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image | |
# input. I recommend grabbing an emoji from https://emojipedia.org/ | |
set -euo pipefail | |
# Number of frames of shaking | |
count=10 | |
# Max pixels to move while shaking |
❱ git config user.signingKey 38AF394C | |
❱ git config commit.gpgSign true | |
❱ echo "test" | gpg --clearsign | |
-----BEGIN PGP SIGNED MESSAGE----- | |
Hash: SHA256 | |
test | |
gpg: signing failed: Inappropriate ioctl for device | |
gpg: [stdin]: clear-sign failed: Inappropriate ioctl for device |
#!/usr/bin/ruby | |
# Quick and easy way to convert from yaml to json with pretty format | |
# Usage: | |
# Example 1: | |
# | |
# # Explicitly give the output filename | |
# ./yaml_to_json.rb input_file/name.yaml outputfile/name.json | |
# | |
# Example 2: | |
# |
// ==UserScript== | |
// @name Jitai | |
// @version 1.3.2 | |
// @description Display WaniKani reviews in randomized fonts, for more varied reading training. | |
// @author Samuel (@obskyr) | |
// @copyright 2016-2018, obskyr | |
// @license MIT | |
// @namespace http://obskyr.io/ | |
// @homepageURL https://gist.github.com/obskyr/9f3c77cf6bf663792c6e | |
// @icon http://i.imgur.com/qyuR9bD.png |
In test/test_helper.rb
...
### Bullet (N+1 queries)
if ENV['BULLET']
Bullet.enable = true
require 'minitest/unit'
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
I fell in love with CoffeeScript a couple of years ago. Javascript has always seemed something of an interesting curiosity to me and I was happy to see the meteoric rise of Node.js, but coming from a background of Python I really preferred a cleaner syntax.
In any fast moving community it is inevitable that things will change, and so today we see a big shift toward ES6, the new version of Javascript. It incorporates a handful of the nicer features from CoffeeScript and is usable today through tools like Babel. Here are some of my thoughts and issues on moving away from CoffeeScript in favor of ES6.
While reading I suggest keeping open a tab to Babel's learning ES6 page. The examples there are great.
Holy punctuation, Batman! Say goodbye to your whitespace and hello to parenthesis, curly braces, and semicolons again. Even with the advanced ES6 syntax you'll find yourself writing a lot more punctuatio
Republished on my website, keeping this version here for historical reasons.
Install FAHClient as documented in the official guide. Stop the traditional init script service that was created and automatically started.
#!/bin/bash | |
# | |
# Efstathios Xagoraris <sxagoraris@gmail.com> | |
# Validate YAML files using ruby | |
# | |
if [ $# -eq 0 ] | |
then |