Skip to content

Instantly share code, notes, and snippets.

View RStankov's full-sized avatar
🤖
👨‍💻

Radoslav Stankov RStankov

🤖
👨‍💻
View GitHub Profile
<!DOCTYPE html>
<html>
<head>
<title>light show</title>
<style>
ul {
list-style-type: none;
}
li {
width: 10px;
(function($, doc) {
var getHTML;
if ('outerHTML' in doc.documentElement) {
getHTML = function getHTML() {
return $.String(this.raw.outerHTML);
};
} else {
var dummy = doc.createElement('html');
getHTML = function getHTML() {
<select name="add_filter" id="add_filter">
<option></option>
<option value="n_ticket" >Nº do ticket</option>
<option value="priority">Prioridade</option>
<option value="category">Categoria</option>
<option value="module">Módulo</option>
<option value="subject">Título</option>
<option value="date_sol">Data de solicitação</option>
<option value="solicitant">Solicitante</option>
<option value="status">Status</option>
<?php
/*
Original version:
written by Jarrod Oberto
taken from http://net.tutsplus.com/tutorials/php/image-resizing-made-easy-with-php/
Example usage:
include("classes/Resize.php");
(function(){
function isForm(element) {
return element.nodeName.toUpperCase() == 'FORM';
}
function isInput(element) {
var name = element.nodeName.toUpperCase()
return name == 'INPUT' || name == 'SELECT' || name == 'TEXTAREA';
}
S2.FX.TOGGLE_PAIRS = {
'fade': ['fade', 'appear'],
'slide': ['slideUp', 'slideDown']
};
Element.addMethods({
toggleWithEffect: function(element, effect, options){
element = $(element)
effect = (S2.FX.TOGGLE_PAIRS[effect] || S2.FX.TOGGLE_PAIRS['fade'])[+element.visible()];
return element.effect(effect, options);
CD3.Behaviors.shortcuts({
'cmd+f:#section': App.search, // for windows will translated to ctrl+f
'esc': {
'.new_task': App.cancelNewTask,
'.task': App.cancelEditTaskForm,
'.new_comment': App.cancelNewComment,
'.comment': App.cancelEditComment
},
'shift+up': {
'.task': App.moveTask('up'),
# fix for send_reset_password_instructions with different authentication_keys than email
module Devise
# lib/devise/models/authenticatable.rb
module Models
def find_or_initialize_with_errors(attributes, error=:invalid)
attributes = attributes.slice(*authentication_keys)
attributes.delete_if { |k, v| !v.present? }
if attributes.size == authentication_keys.size
record = find(:first, :conditions => attributes)