Skip to content

Instantly share code, notes, and snippets.

View ravidsrk's full-sized avatar
🎯
Focusing

Ravindra Kumar ravidsrk

🎯
Focusing
View GitHub Profile
@ravidsrk
ravidsrk / jquery.ba-tinypubsub.js
Created November 9, 2012 09:44 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/* jQuery Tiny Pub/Sub - v0.7 - 10/27/2011
* http://benalman.com/
* Copyright (c) 2011 "Cowboy" Ben Alman; Licensed MIT, GPL */
(function($) {
var o = $({});
$.subscribe = function() {
o.on.apply(o, arguments);
<ul id="members" data-role="listview" data-filter="true">
<!-- ... more list items ... -->
<li>
<a href="detail.html?id=10">
<h3>John Resig</h3>
<p><strong>jQuery Core Lead</strong></p>
<p>Boston, United States</p>
</a>
</li>
<!-- ... more list items ... -->
package test.fragment;
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
public class MainActivity extends Activity {

Problem: What does a Modern Front-End Development Workflow Look Like?

I want to start writing libraries and large applications using the JavaScript language. However, I don't know how to setup the project and which build tools to use. What I do know is that the JavaScript community has moved way beyond using browser developer tool plugins and strategically-placed console.log() statements to debug, test, and build code.

I need help.

Below, I will keep track of articles, tutorials and tools I come across as I search for a way to bring my front-end development chops up-to-date.

Articles

var Crittercism = function () {
function l(a) {
var a = a || {
guess: !0
}, b = a.e || null,
a = !! a.guess,
c = new l.implementation,
b = c.run(b);
return a ? c.guessAnonymousFunctions(b) : b
}

CasperJS Google Suggest

The script:

/*global casper:true*/
var casper = require('casper').create();
var suggestions = [];
var word = casper.cli.get(0);

Debugging & Profiling Node.js

This is a maintained listing of all the different ways to debug and profile Node.js applications. If there is something missing or an improvement, post a comment! :)

Interactive Stack Traces with traceGL - Shareware

  1. Guide here
@ravidsrk
ravidsrk / gist:5764074
Created June 12, 2013 09:48
Iterate Over a Map in Java
// Method #1: Iterating over entries using For-Each loop.
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
for (Map.Entry<Integer, Integer> entry : map.entrySet()) {
System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());
}
// Method #2: Iterating over keys or values using For-Each loop.
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
//iterating over keys only
@ravidsrk
ravidsrk / gist:6018066
Created July 17, 2013 06:16
LAMP Server setup commands
6 apt-get install mysql-server mysql-client
7 apt-get update
8 apt-get upgrade
9 apt-get install apache2
10 ifconfig eth0 | grep inet | awk '{ print $2 }'
11 sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
12 sudo mysql_install_db
13 sudo /usr/bin/mysql_secure_installation
14 sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt
15 vim /etc/apache2/mods-enabled/dir.conf
import com.actionbarsherlock.app.ActionBar;
import com.actionbarsherlock.app.ActionBar.Tab;
import com.actionbarsherlock.app.SherlockActivity;
import android.os.Bundle;
import android.app.Activity;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.util.Log;
import android.view.Menu;