This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~/Desktop cat hello_crystal.cr | |
puts "hello world" | |
➜ ~/Desktop cat hello_rust.rs | |
fn main() { | |
println!("hello world"); | |
} | |
➜ ~/Desktop crystal --version | |
Crystal 0.25.0 [7fb783f7a] (2018-06-11) | |
LLVM: 4.0.0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Problem: | |
# | |
# There is a 10-12 second delay between each print job when printing labels on a Dymo LabelWriter | |
# (and probably other Dymo printers) via newer versions of Cups. This affects macOS High Sierra, | |
# Raspbian Linux, and probably other Linux distributions. | |
# | |
# This script is a hack to work around the problem by killing hung print processes once the label is finished printing. | |
# | |
# Script Usage: | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# export a list from Planning Center People to CSV | |
# | |
# setup: | |
# 1. gem install pco_api | |
# 2. create a personal access token at https://api.planningcenteronline.com/oauth/applications | |
# 3. edit the app id and secret below | |
# | |
# usage: | |
# ruby people_list_to_csv.rb listid filename.csv | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install http | |
# unzip archive.zip -d archive | |
# cd archive | |
# ruby archive.rb | |
require 'http' | |
require 'fileutils' | |
require 'digest' | |
FileUtils.mkdir_p('media') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Run several commands for different directories at the same time and multiplex their output with color-coded app labels. | |
# | |
# Usage: | |
# | |
# ruby parallel.rb "foo:$HOME/projects/foo:bundle exec rake db:migrate" "bar:$HOME/projects/bar:bundle exec rake db:migrate" | |
# | |
# The output will look something like this (but the prefix labels will have different colors): | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# pass 3 numbers as arguments: | |
# | |
# ./boardslam.rb 3 5 1 | |
# | |
# 3 - 5^0 - 1 = 1 | |
# 3 - 5^0 * 1 = 2 | |
# 3 + 5^0 - 1 = 3 | |
# 3 + 5^0 * 1 = 4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[logging] | |
default = FILE:/var/log/krb5libs.log | |
kdc = FILE:/var/log/krb5kdc.log | |
admin_server = FILE:/var/log/kadmind.log | |
[libdefaults] | |
default_realm = CRCCMINISTRIES.COM | |
#ticket_lifetime = 24h | |
forwardable = yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on " enable syntax highlighting | |
set background=dark " we like it dark! | |
try | colorscheme gruvbox | catch | endtry " use this awesome theme if possible | |
highlight Pmenu ctermbg=black guibg=black | " fix popup color so it's easier to read | |
filetype plugin on " load plugins based on file type | |
filetype indent on " load indent settings based on file type | |
set shiftwidth=2 " number of spaces to use for indenting | |
set softtabstop=2 " number of spaces to use when inserting a tab | |
set tabstop=2 " show tabs as 2 spaces | |
set expandtab " convert tabs into spaces |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Trello Tweaks | |
// @namespace http://timmorgan.org | |
// @include https://trello.com/* | |
// @version 1 | |
// @grant none | |
// ==/UserScript== | |
// press Q to show cards not assigned to anyone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
project=$1 | |
wget --mirror -k -np http://hexdocs.pm/$project | |
ruby -e "puts ARGF.read.scan(/[A-Z]\\w*\\.[\\w\\.]+/).uniq.map { |l| 'http://hexdocs.pm/$project/' + l + '.html' }" hexdocs.pm/$project/dist/sidebar_items.js | wget --mirror -k -i - | |
wget --mirror -k http://hexdocs.pm/$project/extra-api-reference.html |