Skip to content

Instantly share code, notes, and snippets.

rails assets:precompile -> This is the command you use to compress the assets .
- This command will generate assets via using the asset pipelining. And have them
in public/assets folder.
rails assets:clean -> This will clean the older assets you have .
- This command will clear older versions of the assets
rails assets:clobber -> Nuke public/assets .
- delete everything.
Build a Collaborative Learning System where you can collaborate on educational contents .
Here are the user stories
1) User should be able to register using his username, email address and password
2) User should recieve confirmation email after registering
3) User should only be able to log in after confirmation.
4) User should be able to add any topic to discuss with his/her friends.
5) Users should be able to add comments into any discussion topics.
6) User should be able to view all the comments in any topic being discussed.
7) User should be notified whenever any discussion he is involved in has any changes via Email.
8) User should be notified whenever any new topic is added to be discussed via Email.
class @TimeMachine
constructor: (parameter) ->
that = @
@element = $('grab from id or class')
@element.on 'click', (event) ->
the_function
the_function = ->
@element.toggleClass('.color')
class @DateParameter
constructor: ->
that = @
@date = $('.date')
@date.on 'click', (e) ->
@parent_date=this.parentNode;
unless @parent_date.classList.contains("notmonth")
reload_display this.innerHTML
$(".date").unbind("click");
else
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/
# \etrack
class @StopWatch
MAX_HOUR: 12
MAX_MINUTE: 59
constructor: ->
that = @
@xecutioner
xecutioner / fast.rb
Created November 18, 2016 10:43 — forked from vayu-technology/fast.rb
Check network over time with fast.com + ruby
require 'rubygems'
require 'capybara'
require 'capybara/dsl'
require 'capybara/rspec'
require 'capybara/poltergeist'
require 'csv'
require 'pry'
include Capybara::DSL
Capybara.register_driver :poltergeist do |app|
@xecutioner
xecutioner / ci_install.sh
Created May 18, 2016 11:30 — forked from ryane/ci_install.sh
A script (or just list of commands) to setup a jenkins server on Ubuntu 12.04 hosted at linode. Liberally borrowed from https://gist.github.com/whistler/3179919#file-jenkins_rails_ubuntu-sh
sudo aptitude -y install build-essential libssl-dev libreadline5 libreadline5-dev zlib1g zlib1g-dev
sudo apt-get -y install libxslt-dev libxml2-dev
sudo apt-get -y install libmysqlclient-dev ruby-dev
sudo apt-get -y install libcurl4-openssl-dev
sudo apt-get -y install imagemagick libmagickcore-dev libmagickwand-dev
sudo apt-get -y install libsqlite3-dev
sudo apt-get -y install libreadline-dev
sudo apt-get -y install git
sudo apt-get -y install libicu48
sudo apt-get -y install nodejs
@xecutioner
xecutioner / change_authorname.sh
Created May 16, 2016 12:15
Change author name
git filter-branch --commit-filter 'if [ "$GIT_AUTHOR_NAME" = "Josh Lee" ];
then export GIT_AUTHOR_NAME="Hobo Bob"; export [email protected];
fi; git commit-tree "$@"'
@xecutioner
xecutioner / a.rb
Created April 4, 2016 03:45
git stats
git log --author="nikesh" --pretty=tformat: --numstat | awk '{ add += $1; subs += $2; loc += $1 - $2 } END { printf "added lines: %s, removed lines: %s, total lines: %s\n", add, subs, loc }' -
@xecutioner
xecutioner / a.rb
Created March 11, 2016 11:52
resetting postgres database
find the file pg_hba.conf - it may be located, for example in /etc/postgresql-9.1/pg_hba.conf.
cd /etc/postgresql-9.1/
Back it up
cp pg_hba.conf pg_hba.conf-backup
place the following line (as either the first uncommented line, or as the only one):