Skip to content

Instantly share code, notes, and snippets.

View perminder-klair's full-sized avatar
🎯
Focusing

Parminder Klair perminder-klair

🎯
Focusing
View GitHub Profile
@perminder-klair
perminder-klair / push_all
Created November 18, 2013 15:13
First time force push
git push -u origin -all
@perminder-klair
perminder-klair / edit_root_files.sh
Created November 15, 2013 23:25
edit root files mac
sudo vim ~/.bash_profile
@perminder-klair
perminder-klair / post-json-php.js
Created October 30, 2013 10:57
Post Json data to PHP using jquer ajax
var data = {"data1": "val1", "data2": "val2", "data3": "val3"};
var dataEncoded = JSON.stringify(data);
$.ajax({
type: "POST",
url: "post-data.php",
// The key needs to match your method's input parameter (case-sensitive).
data:{"data":dataEncoded},
dataType: "json",
success: function(data){
@perminder-klair
perminder-klair / Visual-Event.js
Created October 28, 2013 16:01
Visual Event Bookmark for debug
javascript:(function() {var protocol = window.location.protocol === 'file:' ?'http:' : '';var url = protocol+'//www.sprymedia.co.uk/VisualEvent/VisualEvent_Loader.js';if( typeof VisualEvent!='undefined' ) {if ( VisualEvent.instance !== null ) {VisualEvent.close();}else {new VisualEvent();}}else {var n=document.createElement('script');n.setAttribute('language','JavaScript');n.setAttribute('src',url+'?rand='+new Date().getTime());document.body.appendChild(n);}})();
@perminder-klair
perminder-klair / blugaa-ajax-code.js
Created October 27, 2013 09:12
blugaa ajax code
function getRandomString(e) {
var t = "";
var n = "abcdefghijklmnopqrstuvqxyz";
for (var r = 0; r < e; r++) t += n.charAt(Math.floor(Math.random() * n.length));
return t
}
function blugaaRadio() {
this.queue = new Array;
this.dequeue = function() {
this.enqueue();
@perminder-klair
perminder-klair / Ajax-Link
Created October 27, 2013 00:00
Ajax Link
@perminder-klair
perminder-klair / My_SQL_datetime.sql
Created October 26, 2013 15:38
My SQL datetime
sqlDateTime()
@perminder-klair
perminder-klair / restart_mac_mysql.sh
Created October 26, 2013 14:53
Restart Mac MySql
sudo /Library/StartupItems/MySQLCOM/MySQLCOM restart
@perminder-klair
perminder-klair / rails_resources.md
Created October 26, 2013 10:55 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@perminder-klair
perminder-klair / css_resources.md
Created October 26, 2013 10:55 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides