Skip to content

Instantly share code, notes, and snippets.

import React from 'react';
import {
Sphere
} from 'react-vr';
import * as CANNON from 'cannon/build/cannon.js'
export default class Particle extends React.Component {
constructor(props) {
this.body = new CANNON.Body({
mass: 1,
@nickarthur
nickarthur / dynamo cheet sheet.sh
Created April 12, 2018 23:45 — forked from willm/dynamo cheet sheet.sh
dynamo cheat sheet
#count of items
aws dynamodb scan --table-name baskets --select COUNT
#item by key
aws dynamodb get-item --table-name baskets --key '{"Id":{"S": "195eaf9c-50e6-4524-81e0-22403e46b6df"}}'
git remote prune origin - to remove a deleted remote branch.
git rebase -i - interactive rebase with options to pick, squash, discard and reorder commits.
git update-index --assume-unchanged
Undoing a merge:
$ git pull $REMOTE $BRANCH
# uh oh, that wasn't right
$ git reset --hard ORIG_HEAD
# all is right with the world
git remote prune origin - to remove a deleted remote branch.
git rebase -i - interactive rebase with options to pick, squash, discard and reorder commits.
git update-index --assume-unchanged
Undoing a merge:
$ git pull $REMOTE $BRANCH
# uh oh, that wasn't right
$ git reset --hard ORIG_HEAD
# all is right with the world

Discard unstaged changes

For a single file: git checkout path/to/file/to/revert

For all unstaged files: git checkout -- .

List all untracked files

git ls-files --others --exclude-standard

@nickarthur
nickarthur / git commands.md
Created April 29, 2018 03:43 — forked from scootcho/git commands.md
git commands #git #commands

initialize git depository in the current directory

git init .

display the git remote/origin

cat .git/config
# guardar comando de push para o origin depois de um 'git remote add'
git push -u origin master
# diferenças entre as alterações locais e o HEAD
git diff HEAD
# mostra apenas a diferença no staged
git diff --staged
# remove do staged
# Removing a branch
Local : git branch -D <branch>
Remote : git push origin :<branch>
#---------------------------
# Rename commit message
# ref: http://darrinholst.com/post/359817782
git rm --cached filename
git update-index --assume-unchanged [path]
@nickarthur
nickarthur / TS_01_start.ts
Created April 29, 2018 03:45 — forked from Y2017/TS_01_start.ts
Typescript
// Install the TypeScript transpiler using npm:
$ npm install -g typescript
// Then use tsc to manually compile a TypeScript source file into ES5:
$ tsc test.ts
$ node test.js
// Since TypeScript@1.8.2, tsc has a default rule for --module option: target === 'ES6' ? 'ES6' : 'commonjs' (more details can be found here), so we can simply run:
$ tsc ./a.ts ./b.ts
// For Angular 2 projects there are a number of specific settings that need to be configured in a project's