- Adopted from: https://stubby4j.com/docs/admin_portal.html
- Inspired by Swagger API docs style & structure: https://petstore.swagger.io/#/pet
This file contains 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
require 'fileutils' | |
namespace :html2sprockets do | |
desc "Setup env for gem creation" | |
task :env do | |
@gemname = ENV.fetch('NAME') | |
@gemdir = File.join(ENV.fetch('GEMDIR', 'vendor/gems'), @gemname) | |
@asset_dst_path = File.join(@gemdir, ENV.fetch('DST', 'vendor/assets')) | |
@asset_src_paths = ENV.fetch('SRC').each_line.collect(&:strip) |
This file contains 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
@-webkit-keyframes u-progress-stripes { | |
from { background-position: 0 0 } | |
to { background-position: 40px 0 } | |
} | |
@-moz-keyframes u-progress-stripes { | |
from { background-position: 0 0 } | |
to { background-position: 40px 0 } | |
} | |
@keyframes u-progress-stripes { | |
from { background-position: 0 0 } |
This file contains 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 | |
## | |
# Backup Server to S3 script | |
# | |
# Creates a local cached backup of the source folder using rsync and then | |
# synchronises that with Amazon S3. | |
# | |
# | |
# It is assumed you have rsync installed on the server. |
This file contains 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
//Based on http://www.samliew.com/icval/ | |
function validateNRIC(str) { | |
if (str.length != 9) | |
return false; | |
str = str.toUpperCase(); | |
var i, | |
icArray = []; | |
for(i = 0; i < 9; i++) { |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
This file contains 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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
June 7-8, 2013
Web site: http://reddotrubyconf.com/ Twitter: http://twitter.com/reddotrubyconf
Ping me @cheeaun on Twitter if you found some awesome stuff for #rdrc. This gist will be updated whenever there's new stuff.
Previously, on RedDotRubyConf 2012
This file contains 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
require "rspec/core/formatters/progress_formatter" | |
class ApplauseFormatter < RSpec::Core::Formatters::ProgressFormatter | |
def initialize(output) | |
super(output) | |
unless File.exists? "/tmp/applause.mp3" | |
p "Downloading applause for awesomeness" | |
system "wget http://www.soundjay.com/human/applause-1.mp3 -O /tmp/applause.mp3" | |
end | |
end |
NewerOlder