Skip to content

Instantly share code, notes, and snippets.

@arafatm
arafatm / emoji.mkd
Last active February 8, 2021 20:33

My emoji's (4 chars and less)

My List --- --- --- --- --- ---
🔥 fire 💩 shit 💡 bulb 💥 boom 📣 mega 😡 rage ⛵ boat
💯 100 🅰️ a 🅱️ b 📖 book 🎯 dart 💎 gem 🎁 gift
🔑 key 🔗 link 🔒 lock 📝 memo 🌔 moon 🅾️ o2 ⭕ o
🙏 pray 🚢 ship 🆘 sos ⭐ star 🎉 tada ™️ tm ❌ x

| Quick | --- | --- | --- | --- | --- | --- |

@arafatm
arafatm / Vagrantfile
Created December 12, 2016 17:43 — forked from Sharpie/Vagrantfile
A simple Vagrantfile for spinning up a master-agent pair.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# This configuration requires Vagrant 1.5 or newer and two plugins:
#
# vagrant plugin install vagrant-hosts ~> 2.1.4
# vagrant plugin install vagrant-auto_network ~> 1.0.0
#
# After installation, the following steps will spin up a master and agent that
# can communicate with each other:
arafatm@ARAFATM_WIN7 /c/home/code
$ ruby dnd.rb +5 2d6+4
AC | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
HIT | 0.70 | 0.65 | 0.60 | 0.55 | 0.50 | 0.45 | 0.40 | 0.35 | 0.30 | 0.25 | 0.20 | 0.15 | 0.10 | 0.05 |
D/R | 7.70 | 7.15 | 6.60 | 6.05 | 5.50 | 4.95 | 4.40 | 3.85 | 3.30 | 2.75 | 2.20 | 1.65 | 1.10 | 0.55 |
On a hit, avg dmg = 11.0
arafatm@ARAFATM_WIN7 /c/home/code
$ ruby dnd.rb +4 2d6+7
arafatm@ARAFATM_WIN7 /c/home/code
$ ruby dnd.rb +5 1d8+4 2
AC | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
HIT | 0.70 | 0.65 | 0.60 | 0.55 | 0.50 | 0.45 | 0.40 | 0.35 | 0.30 | 0.25 | 0.20 | 0.15 | 0.10 | 0.05 |
D/R | 11.90 | 11.05 | 10.20 | 9.35 | 8.50 | 7.65 | 6.80 | 5.95 | 5.10 | 4.25 | 3.40 | 2.55 | 1.70 | 0.85 |
On a hit, avg dmg = 8.5
arafatm@ARAFATM_WIN7 /c/home/code
$ ruby dnd.rb +3 1d8+4 3
#!/usr/bin/env ruby
# USAGE: dnd.rb +0 0d0[+0] [0]
# e.g. dnd.rb +0 2d6
# or dnd.rb +5 2d6+6 2 (for 2 attacks per round e.g. flurry)
if ARGV.length < 2
puts "ARGS = attk dmg"
puts "e.g. +5 2d6+2"
exit
end
@arafatm
arafatm / rbenv_install.mkd
Last active August 29, 2015 14:04
RBenv Install
vagrant@precise32:/vagrant$ bundle install --verbose --without production
Fetching from: https://rubygems.org/api/v1/dependencies
HTTP Redirection
Fetching from: https://bundler.rubygems.org/api/v1/dependencies
HTTP Success
Fetching gem metadata from https://rubygems.org/
Query List: ["rails", "sqlite3", "sass-rails", "uglifier", "coffee-rails", "jquery-rails", "turbolinks", "jbuilder", "sdoc", "pg", "rails_12factor"]
Query Gemcutter Dependency Endpoint API: rails,sqlite3,sass-rails,uglifier,coffee-rails,jquery-rails,turbolinks,jbuilder,sdoc,pg,rails_12factor
Fetching from: https://rubygems.org/api/v1/dependencies?gems=rails,sqlite3,sass-rails,uglifier,coffee-rails,jquery-rails,turbolinks,jbuilder,sdoc,pg,rails_12factor
HTTP Redirection
@arafatm
arafatm / furaha_03_ruby.mkd
Last active December 30, 2015 10:39
Learn Ruby the Hard Way
# Watch test and app directories and run tests if any files change
require 'colorize'
def watch_tests
watch( 'test/(.*)/(.*).rb' ) do |md|
puts "\n\n--------------- #{md[0]}".colorize(:cyan)
run_test md[0]
end
end