This file contains hidden or 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
| /** | |
| * This code contains an implementation of HTML5 outlining algorithm, as described by WHATWG at [1] | |
| * | |
| * The copyright notice at [2] says: | |
| * (c) Copyright 2004-2009 Apple Computer, Inc., Mozilla Foundation, and Opera Software ASA. | |
| * You are granted a license to use, reproduce and create derivative works of this document. | |
| * | |
| * [1] http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#outlines | |
| * [2] http://www.whatwg.org/specs/web-apps/current-work/multipage/index.html | |
| */ |
This file contains hidden or 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
| mongoimport | |
| -h [ --host ] arg mongo host to connect to ( <set name>/s1,s2 for sets) | |
| -u [ --username ] arg username | |
| -p [ --password ] arg password | |
| -d [ --db ] arg database to use | |
| -c [ --collection ] arg collection to use (some commands) | |
| -f [ --fields ] arg comma separated list of field names e.g. -f name,age | |
| --file arg file to import from; if not specified stdin is used | |
| --drop drop collection first | |
| --upsert insert or update objects that already exist |
This file contains hidden or 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
| editor | |
| foreground: cccccc | |
| background: 2d2d2d | |
| caret: cc99cc | |
| editor-selection | |
| foreground: ffffff | |
| background: 515151 | |
| H1 |
This file contains hidden or 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
| # Example controller | |
| class IncomesController < ApplicationController | |
| # Include the print | |
| include Controllers::Print | |
| # GET /incomes/1 | |
| def show | |
| @income = present Income.find(params[:id]) | |
| respond_to do |format| |
This file contains hidden or 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
| ''' scrapes a website for urls ''' | |
| import requests | |
| from bs4 import BeautifulSoup | |
| class URLTest(): | |
| def __init__(self, link, status_code, current_depth, head): | |
| self.link = link | |
| self.status_code = status_code |
This file contains hidden or 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 jsdom = require('jsdom'), | |
| request = require('request'), | |
| url = require('url'), | |
| npm = require("npm"), | |
| redis = require("redis"); | |
| var client = redis.createClient(); | |
| var configObject = { | |
| "dev": false, |
This file contains hidden or 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 request = require('request'), | |
| cheerio = require('cheerio'), | |
| async = require('async'); | |
| var base = 'https://www.npmjs.org', | |
| concurrency = 2; | |
| var q = async.queue(function(task, next) { | |
| setTimeout(function() { | |
| console.log('GET ' + task.url); |
This file contains hidden or 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
| #!/usr/bin/python | |
| import csv, sys, os | |
| import numpy as np | |
| # Get the top X non-fork projects for the GHTorrent dump (without using SQL) | |
| # The dumps should be available at http://ghtorrent.org/downloads.html | |
| if len(sys.argv) < 5: | |
| print "Usage <dir> <language> <topX> <outcsv>" | |
| sys.exit(-1) |
This file contains hidden or 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
| [client] | |
| socket = /tmp/mysql.sock | |
| default-character-set = utf8 | |
| [mysqld] | |
| socket = /tmp/mysql.sock | |
| datadir = /usr/local/mysql/data |
This file contains hidden or 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
| /** | |
| * Created by shahartaite on 23/11/2016. | |
| */ | |
| import consts from 'js/consts'; | |
| export const allLeftNavSelectedFiltersSelector = (state) => state[consts.TOP_LEVEL_STATE_REDUCERS.FILTERING_THING_CAPABILITIES_REDUCER].get(consts.STATE_INNER_OBJECT_NAMES.LEFT_NAV_SELECTED_FILTER_PATHS).toJS(); | |
| export const selectedSearchBarTermSelector = (state) => { | |
| return state[consts.TOP_LEVEL_STATE_REDUCERS.FILTERING_THING_CAPABILITIES_REDUCER].get(consts.STATE_INNER_OBJECT_NAMES.SEARCH_BAR_TERM).toJS(); | |
| } | |
| export const graphStartTimeSelector = (state) => state[consts.TOP_LEVEL_STATE_REDUCERS.FILTERING_THING_CAPABILITIES_REDUCER].get(consts.STATE_INNER_OBJECT_NAMES.SELECTED_START_TIME_FOR_GRAPHS); |
OlderNewer