Skip to content

Instantly share code, notes, and snippets.

View supnate's full-sized avatar
🎯
Muse.

Nate Wang supnate

🎯
Muse.
View GitHub Profile
import sublime, sublime_plugin
class TestCommand(sublime_plugin.ApplicationCommand):
def __init__(self):
super(TestCommand, self).__init__()
#do your stuf here
def run(self, edit):
pass
@joesepi
joesepi / node_env.py
Last active May 26, 2022 07:22 — forked from joaoneto/node_env.py
Updated python script to manage nvm and ST3 pathing for OSX
# Sublime package NVM node path configuration
# Save this file in:
# ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/node_env.py
import os
os.environ["PATH"] = "/Users/YOUR_USERNAME/.nvm/v0.10.26/bin:/Users/cranemes/.nvm/v0.10.26/lib:/Users/YOUR_USERNAME/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
print("PATH=" + os.environ["PATH"])

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@nkbt
nkbt / .eslintrc.js
Last active May 11, 2024 13:03
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@evantoli
evantoli / GitConfigHttpProxy.md
Last active July 20, 2024 03:29
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like:

@rundef
rundef / merge-nyc-code-coverage-reports.js
Last active December 22, 2020 16:45
Script to merge multiple nyc/istanbul code coverage json reports into a single html report: http://rundef.com/typescript-code-coverage-istanbul-nyc
var path = require('path'),
fs = require('fs'),
libCoverage = require('nyc/node_modules/istanbul-lib-coverage'),
libReport = require('nyc/node_modules/istanbul-lib-report'),
reports = require('nyc/node_modules/istanbul-reports');
var rootFolder = __dirname;
var mergeIntoFolder = 'final';
var files = fs.readdirSync(rootFolder);
var mergedCoverageMap = null;
@parties
parties / renameReactJsToJsx.sh
Last active July 19, 2024 19:27
rename all *.js files containing React markup to *.jsx
# finds all *.js files that have either `</` or `/>` tags in them and renames them to *.jsx
find ./src -type f -name '*.js' -not -name '*.jsx' -not -name '*.ejs' -exec bash -c 'grep -l -E "</|/>" "$0"' {} \; -exec bash -c 'mv "$0" "${0%.js}.jsx"' {} \;