Skip to content

Instantly share code, notes, and snippets.

View krzysu's full-sized avatar

Kris Urbas krzysu

View GitHub Profile
naming conventions:
CRUD: create, read, update, delete
REST: post, get (-> fetch), put, delete
Database style: insert, select, update, delete
@krzysu
krzysu / keybase.md
Created April 6, 2019 10:05
keybase

Keybase proof

I hereby claim:

  • I am krzysu on github.
  • I am krzysu (https://keybase.io/krzysu) on keybase.
  • I have a public key ASCafPvulYf8nWCDXAdo7G8f4qra8h4Mx-n9tpTy-16D9go

To claim this, I am signing this object:

@krzysu
krzysu / config
Created January 12, 2018 10:58
ssh config
# path ~/.ssh/config
Host *
AddKeysToAgent yes
UseKeychain yes
Host prd
Hostname prd.long.name.hostname.com
ForwardAgent yes
IdentityFile ~/.ssh/id_rsa_encrypted
@krzysu
krzysu / getAllCoordinates.elm
Created December 22, 2017 22:36
double for-loop in elm ;)
getAllCoordinates : Int -> List ( Int, Int )
getAllCoordinates size =
let
lengthAsArray =
List.range 0 (size - 1)
in
lengthAsArray
|> List.concatMap
(\x ->
List.map
@krzysu
krzysu / gist:fee862390f18a71a1c73ecc2d6c1eed1
Last active November 2, 2017 09:54
git advanced commands
# for local branches
git branch -avv | grep "release-2014" | awk '{ print $1 }' | xargs -n 1 git branch -D
# by branch name pattern
git branch -avv | grep "release-2014" | awk '{ gsub(/remotes\/origin\//, ""); print $1 }' | xargs -n 1 git push origin --delete
# merged to master
git branch -a --merged | egrep -v "(^\*|master|dev)" | awk '{ gsub(/remotes\/origin\//, ""); print $1 }' | xargs -n 1 git push origin --delete
# by commit date
@krzysu
krzysu / .gitconfig
Last active February 18, 2020 03:49
git aliases
[alias]
co = checkout
ci = commit
s = status
br = branch
pl = pull --rebase --autostash
ps = push
psf = push --force-with-lease
aa = !git add . && git add -u
rh = reset HEAD
@krzysu
krzysu / gist:a0f44f67c7097e9e8af035af70ec9151
Created December 14, 2016 09:23
copy files to vagrant
vagrant ssh -c "echo '$(cat ~/.gitconfig)' >.gitconfig"
@krzysu
krzysu / App.js
Last active February 16, 2022 20:47
how to integrate react-select with react-dnd
import React, { Component } from 'react';
import Select from 'react-select'
import SortableItem from './SortableItem';
import SortableContainer from './SortableContainer';
import update from 'react/lib/update';
const items = [
{ value: '1', label: 'One' },
{ value: '2', label: 'Two' },
{ value: '3', label: 'Three' },
mogrify -quality 80% -resize 50% *.jpg
@krzysu
krzysu / arrows.scss
Last active August 29, 2015 14:17
css arrow mixins (using border)
@mixin arrow($color, $width) {
display: block;
position: relative;
&:before,
&:after {
content: ' ';
border: solid transparent;
height: 0;
width: 0;