Skip to content

Instantly share code, notes, and snippets.

Avatar

Austin Story Austio

View GitHub Profile
@Austio
Austio / elasticsearch.md
Created Aug 14, 2018 — forked from nicolashery/elasticsearch.md
Elasticsearch: updating the mappings and settings of an existing index
View elasticsearch.md

Elasticsearch: updating the mappings and settings of an existing index

Note: This was written using elasticsearch 0.9.

Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:

$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
  "_id": 1,
@Austio
Austio / tutorial.md
Created Jul 20, 2018 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API
View tutorial.md

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@Austio
Austio / git-serve.md
Created Jul 3, 2018 — forked from datagrok/git-serve.md
How to easily launch a temporary one-off git server from any local repository, to enable a peer-to-peer git workflow.
View git-serve.md

Launch a one-off git server from any local repository.

I [tweeted this already][1] but I thought it could use some expansion:

Enable decentralized git workflow: git config alias.serve "daemon --verbose --export-all --base-path=.git --reuseaddr --strict-paths .git/"

Say you use a git workflow that involves working with a core "official" repository that you pull and push your changes from and into. I'm sure many companies do this, as do many users of git hosting services like Github.

Say that server, or Github, goes down for a bit.

View AwesomeGit.md

last 10 commits

git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -10

When did some file change

git log -p -S

Historical diff to changes on a specific file

git log -p filename

View Docker Cheatsheet
docker prune
- remove all volumes not attached to a container
List images
docker images -a
docker rmi Image Image
View gist:0e07bae473f4857a6008b63fcc45d4c9

Pry Cheat Sheet

Command Line

  • pry -r ./config/app_init_file.rb - load your app into a pry session (look at the file loaded by config.ru)
  • pry -r ./config/environment.rb - load your rails into a pry session

Debugger

@Austio
Austio / ultimate-ut-cheat-sheet.md
Created Oct 27, 2017 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon
View ultimate-ut-cheat-sheet.md

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@Austio
Austio / SMBDIS.ASM
Created Oct 17, 2017 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
View SMBDIS.ASM
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
View dotfile
alias gitclean="git branch | grep -v master | xargs git branch -d"
alias dockerclean="docker rm $(docker ps -a -q) && docker rmi $(docker images -q)"
alias gca="git commit --amend --no-edit"
@Austio
Austio / service_spec.js
Created Mar 3, 2017 — forked from paulsturgess/service_spec.js
Test Axios promise with jasmine-ajax
View service_spec.js
import Service from 'path/to/service';
import 'jasmine-ajax'
describe('Service', () => {
let request, promise;
let instance = Service;
let payload = {foo:'bar'};
let path = '/path';
let callback = jasmine.createSpy('callback');