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 gutil = require("gulp-util"); | |
var open = require("gulp-open"); | |
var sourcemaps = require("gulp-sourcemaps"); | |
var notifier = require("node-notifier") | |
var connect = require("gulp-connect"); | |
var buffer = require("vinyl-buffer"); | |
var source = require("vinyl-source-stream"); | |
var chalk = require("chalk"); | |
var browserify = require("browserify"); |
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
2d | |
3M | |
3d | |
AECOM Technology | |
AES | |
AGCO | |
AK Steel Holding | |
AM | |
AMR | |
ATT |
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
permission | count | |
---|---|---|
android.permission. | 2.0 | |
android.permission.ACCESOFS_WIFI_STATE | 1.0 | |
android.permission.ACCESS_ASSISTED_GPS | 7.0 | |
android.permission.ACCESS_BACKGROUND_SERVICE | 2.0 | |
android.permission.ACCESS_CELL_ID | 2.0 | |
android.permission.ACCESS_CHECKIN_PROPERTIES | 4.0 | |
android.permission.ACCESS_COARSE_LOCATION | 1114.0 | |
android.permission.ACCESS_COARSE_UPDATES | 7.0 | |
android.permission.ACCESS_CORSE_LOCATION | 1.0 |
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
require 'logging' # gem install logging | |
require 'singleton' | |
class Log | |
include Singleton | |
attr_accessor :log_file_name | |
@@file_name = nil | |
# set log file name |
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
// Original code: | |
// https://github.com/ariya/phantomjs/blob/master/examples/waitfor.js | |
// https://github.com/ariya/phantomjs/blob/master/examples/rasterize.js | |
/** | |
* Wait until the test condition is true or a timeout occurs. Useful for waiting | |
* on a server response or for a ui change (fadeIn, etc.) to occur. | |
* | |
* @param testFx javascript condition that evaluates to a boolean, | |
* it can be passed in as a string (e.g.: "1 == 1" or "$('#bar').is(':visible')" or |
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
MongoClient mongoClient = new MongoClient("localhost", 27017); | |
DB db = mongoClient.getDB("archives"); | |
GridFS gridGfs = new GridFS(db, "fs"); | |
// search by metadata | |
BasicDBObject query = new BasicDBObject("metadata.n", "myZipFile") | |
.append("metadata.ver", "1.2.6"); | |
GridFSDBFile zipFile = gridGfs.findOne(query); | |
File outFile = new File("/Users/Khalid/git/gists/file.zip"); | |
outFile.createNewFile(); | |
zipFile.writeTo(outFile); |
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
from json import JSONEncoder | |
class CustomJsonEncoder(JSONEncoder): | |
def remove_none(self, data): | |
if isinstance(data, dict): | |
return {k:self.remove_none(v) for k, v in data.items() if k and v } | |
elif isinstance(data, list): | |
return [self.remove_none(item) for item in data if item] | |
elif isinstance(data, set): |
NewerOlder