Bootstrapped with Create React App Typescript and customized.
- Typescript to add types to JavaScript
- Webpack to build the application
- React for the views
- redux for application state management
Bootstrapped with Create React App Typescript and customized.
Ideas about documenting enough for non-library projects.
The aim of this document is to give rules to follow in order to make a project understandable from a producer and consumer point of view. The idea is to have a simple setup where code self-documents itself whenever possible. When this is not possible we will give options on how to go about it.
| alias grune='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d' | |
| alias drune='docker rm $(docker ps -aq)' |
| # boostrap nested npm modules installation | |
| npm-boot() { | |
| local INIT_DIR=$PWD | |
| # go through all packages and install their dependencies | |
| for package in `ls ./**/package.json | grep -v node_modules` | |
| do | |
| cd $INIT_DIR | |
| cd $(dirname $package) | |
| echo "Installing modules for $PWD" |
| grep -oh 'url[^)]*' ./**/*.css | grep -o "[/.][^\\'\\\"?#]*" |
| // this is the background code... | |
| // listen for our browerAction to be clicked | |
| chrome.browserAction.onClicked.addListener(function (tab) { | |
| // for the current tab, inject the "inject.js" file & execute it | |
| chrome.tabs.executeScript(tab.ib, { | |
| file: 'inject.js' | |
| }); | |
| }); |
| __toString = Object.prototype.toString | |
| isEqual = (a, b) -> | |
| if arguments.length < 2 | |
| return false # cannot compare | |
| typeA = typeOf(a) | |
| typeB = typeOf(b) | |
| # falsy values can be compared by reference except for NaN |
| curl -u <token>:x-oauth-basic -s https://api.github.com/orgs/<orgName>/repos | node -e ' | |
| var repos=""; | |
| process.stdin.resume(); | |
| process.stdin.setEncoding("utf8"); | |
| process.stdin.on("data", function(data){ | |
| repos += data; | |
| }); | |
| process.stdin.on("end", function(){ | |
| JSON.parse(repos).forEach(function(repo){ | |
| require("child_process").spawn("git", ["clone", repo.html_url], {stdio: "inherit"}); |
| var _ = require('underscore'); | |
| var Backbone = require('backbone'); | |
| var cheerio = require('cheerio'); | |
| var request = require('request'); | |
| Backbone.ajax = function(options) { | |
| options.json = true; | |
| return request(options, function(error, result) { | |
| if (error) { |
| import Text.Pandoc.JSON | |
| import System.Directory | |
| import System.FilePath ((</>)) | |
| import qualified Data.Hash.MD5 as MD5 | |
| import System.IO.Temp | |
| import System.Process | |
| import Control.Monad (unless) | |
| main :: IO () | |
| main = toJSONFilter mathToSvg |