

#!/bin/sh | |
print_usage() { | |
echo "usage: compress_video <input_file>" | |
echo "supported formats: mp4, webm, mkv, mov, avi, flv" | |
} | |
get_extension() { | |
f="${1##*/}" | |
case "$f" in |
require 'proc_to_ast' | |
def where(&fn) | |
ast = fn.to_ast | |
source = fn.to_source | |
pp ast:, source: | |
end | |
where { age > 18 && occupation.downcase == 'plumber' } |
ruby '2.7.1' | |
gem 'rails', github: 'rails/rails' | |
gem 'tzinfo-data', '>= 1.2016.7' # Don't rely on OSX/Linux timezone data | |
# Action Text | |
gem 'actiontext', github: 'basecamp/actiontext', ref: 'okra' | |
gem 'okra', github: 'basecamp/okra' | |
# Drivers |
#!/usr/bin/env ruby | |
require 'io/console' | |
class Grid | |
def self.from_str(str, color:) | |
rows = str.lines.map do |line| | |
line.chomp.chars.map do |c| | |
color if c != " ".freeze | |
end | |
end |
group :development, :test do | |
gem 'spring-commands-rspec', require: false | |
gem 'spring-watcher-listen', require: false | |
gem 'spring', require: false | |
# ... | |
end |
const gulp = require('gulp'); | |
const sass = require('gulp-sass'); | |
const postcss = require('gulp-postcss'); | |
const autoprefixer = require('autoprefixer'); | |
const cssnano = require('cssnano'); | |
const sourcemaps = require('gulp-sourcemaps'); | |
const log = require('fancy-log'); | |
const sassSourceFile = 'assets/scss/hyde-hyde.scss'; | |
const outputFolder = 'static/css'; |
Ever wanted to run your integration/end-to-end test suite at a lower speed so that you better could observe what's happening and perhaps make a recording of it?
Here's a a technique I've been using when writing tests with Capybara Selenium WebDriver.
Put this in test/test_helper.rb
or maybe something like spec/support/capybara.rb
.
#!/bin/bash | |
# A simple bash script that creates a custom git command to ignore ALL kinds of | |
# modifications (untracked files, modified files, etc) | |
# Installation: run `sudo sh git-cagate.sh` | |
# Usage: run `git cagate` to ignore ALL modifications | |
cd /bin/ || exit | |
touch git-cagate | |
echo "touch .empty" >> git-cagate |