-- https://news.ycombinator.com/item?id=11396045
SELECT count(*)
FROM (SELECT id, repo_name, path
FROM [bigquery-public-data:github_repos.sample_files]
) AS F
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 util = require('util') | |
, Transform = require('stream').Transform | |
, StreamCombiner = require('./streamcombiner'); | |
var chunks1 = []; | |
var stream1 = new Transform(); | |
var soFar = ''; | |
stream1._transform = function(chunk, encoding, done) { | |
chunks1.push(chunk.toString()); | |
var pieces = (soFar + chunk).split('\n'); |
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 React from 'react'; | |
function onlyChild(children) { | |
return Array.isArray(children) ? children[0] : children; | |
} | |
export function combineContext(contexts) { | |
class Provider extends React.Component { | |
render() { | |
const init = this.props.children; |
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
<div class="privacy-policy"> | |
<h1>Privacy Policy</h1> | |
<section id="privacy-information-we-collect"> | |
<h3>What information do we collect?</h3> | |
<p>We collect information from you when you register on our site, place an order, subscribe to our newsletter, respond to a survey or fill out a form.</p> | |
<p>When ordering or registering on our site, as appropriate, you may be asked to enter your: name, e-mail address, mailing address, phone number, credit card information or social security number. You may, however, visit our site anonymously. | |
Google, as a third party vendor, uses cookies to serve ads on your site. Google's use of the DART cookie enables it to serve ads to your users based on their visit to your sites and other sites on the Internet. Users may opt out of the use of the DART cookie by visiting the Google ad and content network privacy policy.</p> | |
</section> |
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
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
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
command-shift-P > Package > Package Generator: Generate Syntax Theme > mypackage | |
cd ~/.atom/packages/mypackage | |
apm login | |
apm develop mypackage | |
cd ~/github/mypackage | |
sudo chown -R username:wheel . | |
git commit -a -m 'checking everything in' | |
apm publish --tag v2.5.0 minor |
This sets up Atom to properly lint ES6+Babel+JSX using Airbnb's .eslintrc as a starting point.
- Download Atom and get these two packages: Linter and [Linter-ESLint)(https://atom.io/packages/linter-eslint)
- Run
npm install --save-dev eslint-config-airbnb babel-eslint eslint-plugin-react
from your project root. - Add
"extends": "eslint-config-airbnb"
to your .eslintrc
#Ionic Publish Android App
This is the process to publish an ionic android app.
-
Make sure you set/increment the version number in
config.xml
ie0.0.3
. -
Make sure the android platform has been added
NewerOlder