I hereby claim:
- I am allolex on github.
- I am curatur (https://keybase.io/curatur) on keybase.
- I have a public key whose fingerprint is 989B 269F C757 96D9 5229 EF55 140D 40DF 74BB D7B3
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env ruby | |
require 'json' | |
require 'json/add/struct' | |
require 'awesome_print' | |
Serial = Struct.new(:foo, :bar, :baz) | |
s = Serial.new('this','that','the other') | |
puts 'The Struct instance' | |
ap s |
I have moved the regular expression example repository to the regular GitHub site to encourage contributions.
#!/usr/bin/env bash | |
# | |
# Usage: | |
# pattern_rename "SED_PATTERN" "FILE_GLOB" | |
# | |
# Example: | |
# pattern_rename.bash 's/^Youtube - //' "*" | |
# | |
# Don't forget to put your file glob in quotes. |
function SplitIt(macsplit) { | |
var temp = new Array(); | |
var reversed = new Array(); | |
var re_macsplit = /[A-F0-9]/; | |
var j = 0; | |
for (var i = 0; i < macsplit.length; i++) { // Loop through whole MAC ID string | |
if (re_macsplit.test(macsplit[i])) { // Match to hexidecimal number regexp | |
temp[j] = macsplit[i]; // Assign number to the array item |
#!/usr/bin/env bash | |
# Usage in new_script.bash | |
# source /path/to/backup_mysql.bash | |
# backup_mysql your_host host_ip user password | |
function backup_mysql () { | |
REMOTE_HOST_NAME=$1 | |
REMOTE_IP=$2 |
Rails Girls South Florida is open to everyone. We are committed to providing a friendly, safe, and welcoming environment for all.
All event participants are expected to act in a way that will foster a safe and positive event experience for everyone during the event and at affiliated social events. Conference participants are expected to:
This evolved rather quickly. It's now at
https://github.com/WorldwideRubyShops/ruby_worldwide
Open a PR to add your company!
#!/usr/bin/env ruby | |
codes = DATA.readlines | |
while !codes.empty? | |
chunk = codes.shift(4) | |
section = {} | |
chunk.each do |line| | |
team, code = line.chomp.split(/\t/) |
#!/usr/bin/env ruby | |
text = '1,2 3-4,5-6 7,8-9 10-11,12 13 14 1516 17,18' | |
number_or_range = /\d+(?:-\d+)?/ | |
puts text.scan(/#{number_or_range},#{number_or_range}/) |