Skip to content

Instantly share code, notes, and snippets.

@Krettis
Krettis / ssh.md
Last active December 18, 2015 12:40
All ssh-stuff in here

Install your public key into the machine

ssh-copy-id [-i [identity_file]] [user@]machine 

Link to a port in your machine

$ ssh -f -N -L 9471:127.0.0.1:3306 user@db-machine.org.gov
# -f ssh in background

-N not executing a command

@Krettis
Krettis / mongoose
Created November 5, 2015 22:54
mongoose
var _id = mongoose.mongo.BSONPure.ObjectID.fromHexString("4eb6e7e7e9b7f4194e000001");
@Krettis
Krettis / keybase.md
Created September 22, 2015 18:52
keybase.md

Keybase proof

I hereby claim:

  • I am krettis on github.
  • I am krettis (https://keybase.io/krettis) on keybase.
  • I have a public key whose fingerprint is 8323 0FE3 BEE2 5AB0 ADDF 2727 668D 2C06 9551 93A1

To claim this, I am signing this object:

@Krettis
Krettis / psql.md
Last active November 13, 2015 10:29
psql terminal stuff

List

\list or \l: list all databases

select database

\connect dbname or \c dbname

import

psql dbname < filepath

@Krettis
Krettis / explanation dot app arcee.md
Last active August 29, 2015 14:26
Where does .appRC stand for?
  • run commands
  • resource control
  • run control
  • runtime configuration

Personally, I'd go with run control, because ESR says so.

http://www.catb.org/~esr/writings/taoup/html/ch10s03.html
@Krettis
Krettis / gist:e5bcf4d6480a780438cc
Created May 5, 2015 12:02
commit prefix format
Prefix commits
PRJ-P-G04
- Two / Three letter shortname of project
dash
- Type of commmit
- A : api breaking (first number of your semversion)
- F : feature (second number of your semversion)
-- stop all vagrant boxes
vboxmanage list runningvms | sed -E 's/.*\{(.*)\}/\1/' | xargs -L1 -I {} VBoxManage controlvm {} savestate

Developer Cheat Sheets

This are my cheat sheets that I have compiled over the years. Tired of searching Google for the same things, I started adding the information here. As time went on, this list has grown. I use this almost everday and this Gist is the first bookmark on my list for quick and easy access.

I recommend that you compile your own list of cheat sheets as typing out the commands has been super helpful in allowing me to retain the information longer.

@Krettis
Krettis / design-rest-api.md
Last active August 29, 2015 14:16
REST-api convention

Represential State Transfer - api

Only has two types of resources:

  • Collection
  • Instance

URLS

  • Create clean, short, simple uris.
@Krettis
Krettis / composershizzle.md
Last active January 9, 2017 15:02
Handy composer Shizzle

Only update composer lock hash

composer update nothing 

or

composer update --lock

More clean way