-- 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
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
# https://github.com/facebook/react-native/issues/4968
# It tries to require the package from home directory
# instead of the project's node_modules directory, and the following wrror appears
# The Fix
watchman watch-del-all
rm -rf node_modules
npm install
npm start -- --reset-cache
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, { | |
Linking, | |
StyleSheet, | |
WebView, | |
} from 'react-native'; | |
import SomeHTMLFile from './some-html-file.html | |
export default class WebViewExt extends React.Component { | |
constructor() { |
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
function mixin (behaviour, sharedBehaviour = {}) { | |
const instanceKeys = Reflect.ownKeys(behaviour); | |
const sharedKeys = Reflect.ownKeys(sharedBehaviour); | |
const typeTag = Symbol('isa'); | |
function _mixin (target) { | |
for (let property of instanceKeys) | |
Object.defineProperty(target, property, { value: behaviour[property] }); | |
Object.defineProperty(target, typeTag, { value: true }); | |
return target; |
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: var headers = headersFactory(this.state.token); | |
// fetch('/api/v1/some-resource', headers('post', data)) | |
function headersFactory(jwtToken) { | |
return function(method, data) { | |
let header = { | |
mode: 'cors', | |
method: method, | |
headers: { | |
'Accept': 'application/json', |
#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