View executeShellInGradle
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
def getVersionName = { -> | |
def hashStdOut = new ByteArrayOutputStream() | |
exec { | |
commandLine "git", "rev-parse", "--short", "HEAD" | |
standardOutput = hashStdOut | |
} | |
def buildNumberStdOut = new ByteArrayOutputStream() | |
exec { | |
commandLine 'echo', "$BUILD_NUMBER" |
View android_pkg_name_validate.js
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", |
View ArcProgressBar.java
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.droid.widgets; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.graphics.Bitmap; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.PorterDuff; | |
import android.graphics.PorterDuffXfermode; |
View tweetLinky.js
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)) { |
View ThreeDotsLoadingBar
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 in.jasonleon.vanityviews.widget; | |
import android.animation.ObjectAnimator; | |
import android.animation.PropertyValuesHolder; | |
import android.animation.ValueAnimator; | |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.content.res.TypedArray; | |
import android.os.Build; | |
import android.util.AttributeSet; |
View tmux_install.sh
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 |
View LoadMoreListView.java
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; |
View .jsbeautifyrc
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
{ | |
// The plugin looks for a .jsbeautifyrc file in the same directory as the | |
// source file you're prettifying (or any directory above if it doesn't exist, | |
// or in your home folder if everything else fails) and uses those options | |
// along the default ones. | |
// Details: https://github.com/victorporof/Sublime-HTMLPrettify#using-your-own-jsbeautifyrc-options | |
// Documentation: https://github.com/einars/js-beautify/ | |
"html": { | |
"allowed_file_extensions": ["htm", "html", "xhtml", "shtml", "xml", "svg"], |
View ip-num-conversion.js
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
import _ from 'lodash'; | |
import { | |
reduce | |
} from 'lodash'; | |
const IP_CAL = [Math.pow(256, 3), Math.pow(256, 2), Math.pow(256, 1), Math.pow(256, 0)]; | |
function ipToNum(ip) { |
View gem_install_do_mysql.sh
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 |
NewerOlder