This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package me.rishabhmhjn.widgets; | |
import me.rishabhmhjn.R; // might be diffrent for your use | |
import android.content.Context; | |
import android.util.AttributeSet; | |
import android.util.Log; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.widget.AbsListView; | |
import android.widget.AbsListView.OnScrollListener; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
console.log('testing gist create from sublime text'); | |
}()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Error log | |
# Using dm-do-adapter (1.2.0) | |
# Using dm-master-slave-adapter (0.0.4) | |
# Installing do_mysql (0.10.13) | |
# Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. | |
# | |
# /Users/user/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb | |
# checking for mysql_query() in -lmysqlclient... no | |
# *** extconf.rb failed *** | |
# Could not create Makefile due to some reason, probably lack of |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var pattern = /^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+[0-9a-z_]$/i; | |
[ | |
"me.unfollowers.droid", | |
"me_.unfollowers.droid", | |
"me._unfollowers.droid", | |
"me.unfo11llowers.droid", | |
"me11.unfollowers.droid", | |
"m11e.unfollowers.droid", | |
"1me.unfollowers.droid", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install libevent | |
wget https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
tar -zxf libevent-2.0.21-stable.tar.gz | |
cd libevent-2.0.21-stable | |
./configure --prefix=/home/unix_user/usr | |
make && make install | |
# Install ncurses | |
wget http://ftp.gnu.org/pub/gnu/ncurses/ncurses-5.7.tar.gz | |
tar -zxf ncurses-5.7.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function calcStandardDeviation(arr) { | |
// var arr = [23, 37, 45, 49, 56, 63, 63, 70, 72, 82]; | |
var count = arr.length | |
var mean = arr.reduce(function(total, num) { | |
total += num; | |
return total; | |
}, 0) / count; | |
var variance = arr.reduce(function(total, num) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var app = angular.module('tLinky', ['ngSanitize']); | |
app.filter('tweetLinky',['$filter', '$sce', | |
function($filter, $sce) { | |
return function(text, target) { | |
if (!text) return text; | |
var replacedText = $filter('linky')(text, target); | |
var targetAttr = ""; | |
if (angular.isDefined(target)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Getting started with Ruby | |
# http://guides.rubyonrails.org/getting_started.html | |
# Install ruby | |
curl -L https://get.rvm.io | bash -s stable --ruby | |
# Install ruby 1.8.7, since rvm installs 1.8.7 as default | |
rvm install 1.9.3 | |
rvm --default use 1.9.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ItemModel = Backbone.Model.extend({ | |
defaults : { | |
"item_id" : 0, | |
"item_content" : "this is a content" | |
} | |
}); | |
var ItemColl = Backbone.Collection.extend({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var redisConfig = { | |
"host" : "localhost", | |
"port" : "6379", | |
"maxConnections" : 10, | |
"minConnections" : 5, | |
"debug" : true | |
} | |
var redis = require("redis"); |