vim /etc/hosts
# Add line
127.0.0.1 fsevents-binaries.s3-us-west-2.amazonaws.com
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
#Some references: | |
# by Huber Flores: | |
# https://gist.github.com/huberflores/4687766 | |
# https://gist.github.com/huberflores/9886339 | |
# https://gist.github.com/huberflores/4714824 | |
# by Hai on StackOverflow: | |
# http://stackoverflow.com/questions/14951374/didnt-find-class-foo-on-path-dexpathlist | |
# AOSP tutorial: https://source.android.com/source/index.html | |
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
/** | |
* Wrap a `fn` to a Promise. | |
* | |
* @param {Function} fn | |
* @return {fn: Promise, arity: Number} | |
* @api private | |
*/ | |
function wrapToPromise(fn) { | |
var generator = isGenerator(fn) || isGeneratorFunction(fn); |
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 co.codehunters.speg.core.service.notification; | |
import java.io.File; | |
import java.util.HashMap; | |
import javax.mail.internet.MimeMessage; | |
import org.apache.velocity.app.VelocityEngine; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.beans.factory.annotation.Value; |
Only files under 25 MB can be previewed with the Google Drive viewer.
Google Drive viewer helps you preview over 16 different file types, listed below:
- Image files (.JPEG, .PNG, .GIF, .TIFF, .BMP)
- Video files (WebM, .MPEG4, .3GPP, .MOV, .AVI, .MPEGPS, .WMV, .FLV)
- Text files (.TXT)
- Markup/Code (.CSS, .HTML, .PHP, .C, .CPP, .H, .HPP, .JS)
- Microsoft Word (.DOC and .DOCX)
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 fs = require('fs'); | |
//this is the path that QTNetwork classes uses for caching files for it's http client | |
//the path should be the one that has 16 folders labeled 0,1,2,3,...,F | |
exports.cachePath = '/path/to/phantomjs/cache/data/folder'; | |
//this is the extension used for files in the cache path | |
exports.cacheExtension = "d"; | |
//the resources that are to be saved |
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
//PhantomJS http://phantomjs.org/ based web crawler Anton Ivanov anton.al.ivanov@gmail.com 2012 | |
//UPDATE: This gist has been made into a Node.js module and now can be installed with "npm install js-crawler" | |
//the Node.js version does not use Phantom.JS, but the API available to the client is similar to the present gist | |
(function(host) { | |
function Crawler() { | |
this.visitedURLs = {}; | |
}; | |
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 gulp = require('gulp'); | |
var watch = require('gulp-watch'); | |
var shell = require('gulp-shell'); | |
var less = require('gulp-less'); | |
var rimraf = require('gulp-rimraf'); | |
var cssimport = require("gulp-cssimport"); | |
var minifyCSS = require('gulp-minify-css'); | |
var rename = require('gulp-rename'); | |
gulp.task('clean', function() { |
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
antlr\:antlr=2.7.7 | |
aopalliance\:aopalliance=1.0 | |
bsf\:bsf=2.4.0 | |
ch.qos.logback\:logback-classic=1.1.2 | |
com.beust\:jcommander=1.35 | |
com.caucho\:hessian=4.0.7 | |
com.codahale.metrics\:metrics-core=3.0.2 | |
com.codahale.metrics\:metrics-ganglia=3.0.2 | |
com.codahale.metrics\:metrics-graphite=3.0.2 | |
com.codahale.metrics\:metrics-servlets=3.0.2 |
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
// Usage: $(element).scrollToTop([position]) | |
;(function($){ | |
// only allow one scroll to top operation to be in progress at a time, | |
// which is probably what you want | |
var scrollToTopInProgress = false | |
$.fn.scrollToTop = function(position){ | |
var $this = this, | |
targetY = position || 0, |
NewerOlder