Skip to content

Instantly share code, notes, and snippets.

View xirukitepe's full-sized avatar
🙈
See No Evil

Shi xirukitepe

🙈
See No Evil
View GitHub Profile
/*! jQuery UI - v1.9.2 - 2013-02-12
* http://jqueryui.com
* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.accordion.css, jquery.ui.autocomplete.css, jquery.ui.button.css, jquery.ui.datepicker.css, jquery.ui.dialog.css, jquery.ui.menu.css, jquery.ui.progressbar.css, jquery.ui.slider.css, jquery.ui.spinner.css, jquery.ui.tabs.css, jquery.ui.tooltip.css
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS%2CHelvetica%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=dddddd&bgTextureHeader=glass&bgImgOpacityHeader=35&borderColorHeader=bbbbbb&fcHeader=444444&iconColorHeader=999999&bgColorContent=c9c9c9&bgTextureContent=inset_soft&bgImgOpacityContent=50&borderColorContent=aaaaaa&fcContent=333333&iconColorContent=999999&bgColorDefault=eeeeee&bgTextureDefault=glass&bgImgOpacityDefault=60&borderColorDefault=cccccc&fcDefault=3383bb&iconColorDefault=70b2e1&bgColorHover=f8f8f8&bgTextureHover=glass&bgI
/*
* Unobtrusive autocomplete
*
* To use it, you just have to include the HTML attribute autocomplete
* with the autocomplete URL as the value
*
* Example:
* <input type="text" data-autocomplete="/url/to/autocomplete">
*
* Optionally, you can use a jQuery selector to specify a field that can
@xirukitepe
xirukitepe / import.rake
Created May 21, 2013 07:45
import data from a CSV file
require 'csv'
desc "Imports a CSV file into local or production database"
task :import, [:filename] => :environment do
CSV.foreach('public/cats.csv', :headers => true) do |row|
Category.find_or_create_by_description(row.to_hash)
end
end
/*
* Unobtrusive autocomplete
*
* To use it, you just have to include the HTML attribute autocomplete
* with the autocomplete URL as the value
*
* Example:
* <input type="text" data-autocomplete="/url/to/autocomplete">
*
* Optionally, you can use a jQuery selector to specify a field that can
@xirukitepe
xirukitepe / rails.org
Created March 11, 2013 06:54 — forked from map7/rails.org
@xirukitepe
xirukitepe / setAttribute.js
Created March 2, 2013 09:13
setAttribute
$("#add-item").click(function() {
var divs = document.getElementsByClassName('budget-field');
var divs2 = document.getElementsByClassName('mini-field');
var divs3 = document.getElementsByClassName('text-area');
var divs4 = document.getElementsByClassName('check-box');
var divs5 = document.getElementsByTagName('select');
for (i = 0; i < divs.length; i++) {
divs[i].setAttribute('readonly',true);
@xirukitepe
xirukitepe / deploy.rb
Created February 18, 2013 05:16
deploy.rb copy
set :application, "gppb"
set :repository, "git@github.com:AppSource/gppb.git"
set :scm, :git
set :user, "gppb.com"
set :deploy_to, "/home/gppb.com/apps/#{application}"
set :use_sudo, false
set :keep_releases, 5
set :normalize_asset_timestamps, false
# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
@xirukitepe
xirukitepe / Gemfile_structure
Created February 16, 2013 06:15
GemFile structure before deploying to HEROKU!
source 'https://rubygems.org'
gem 'rails', '3.2.11'
# Bundle edge Rails instead:
# gem 'rails', :git => 'git://github.com/rails/rails.git'
gem 'bootstrap-sass', '2.1'
gem 'twitter-bootstrap-rails'
gem 'pg'
@xirukitepe
xirukitepe / fadeout.js.coffee
Last active December 11, 2015 22:58
FadeOut Div with specific setTimeOut function
# Flashing Message
# Fade flash message
$(document).ready ->
$(".alert").fadeOut 4000
$(".alert").mouseenter ->
$(".alert").stop()