Skip to content

Instantly share code, notes, and snippets.

@orodio
orodio / kingdosserRankSystemCucumeber.feature
Created February 8, 2012 08:50
KingDosser Ranks sytem?
# Understanding expected results: username[rank]
Feature: Ranking System
Before:
Given these users
| username |
| user1 |
| user2 |
| user3 |
@orodio
orodio / input_placeholder_color.css.sass
Created September 12, 2012 06:44
Input placeholder color in sass
textarea::-webkit-input-placeholder
color: $color
textarea:-moz-placeholder
color: $color
@orodio
orodio / open.js
Last active October 13, 2015 05:28
open.js
! function($){
$(document)
.on('click', '[data-focus]', function(e){
e.preventDefault();
$($(this).data('focus')).focus();
})
.on('click', 'body', function(e){ $('.open-active').not('[data-persistent]').click(); })
.on({
click: function(e){
e.preventDefault();
@orodio
orodio / filter.js
Last active October 13, 2015 05:37
filter.js
! function($){
$(document).on({
click: function(e){
e.preventDefault();
var $this = $(this),
scope = $this.data('scope'),
$scope = $(scope),
$filter = $($this.data('filter'));
$('[data-filter][data-scope="'+scope+'"].active').removeClass('active');
$('[data-filter="' + $this.data('filter') + '"][data-scope="'+scope+'"]').addClass('active');
@orodio
orodio / dabblet.css
Created December 21, 2012 04:45
Untitled
* { margin:0; padding:0; text-decoration:none; border:none; outline:none; }
body { font-family:helvetica; font-weight:200; font-size:14px; }
.clearfix { *zoom:1; }
.clearfix:before, .clearfix:after { content:''; display:table; }
.clearfix:after { clear:both; }
#everything {
max-width:960px; padding:20px; margin:20px auto;
border-radius:15px; box-shadow: inset 0px 1px 2px rgba(0,0,0,0.5);
border:1px solid rgba(0,0,0,0.05);
<%= detail do %>
<strong>9</strong>
<small>Messages</small>
<% end %>
def generateID
"hello"
end
# used in the generation of shopping
def generateID
"hello"
end
def protect
chars = ('a'..'z').to_a - ['a','e','o','u','i'].to_a
#chars = ('a'..'z').to_a
code_array=[]
1.upto(6) {code_array << chars[rand(chars.length)]}
session[:code] = code_array.to_s
end
def check_for_profanity(field)
if field
if field=~/(fuck)|(cunt)/i
return true
end
end
return false
end