Skip to content

Instantly share code, notes, and snippets.

@vickiccole
vickiccole / css-injs-pseudo-class-equivs.js
Created February 11, 2018 14:44
Css-in-js pseudo class equivalents
// https://medium.com/@pioul/modular-css-with-react-61638ae9ea3e
:first-child i === 0
:last-child i === arr.length - 1
:only-child arr.length === 1
:nth-child(even) i % 2
:nth-child(odd) !(i % 2)
@vickiccole
vickiccole / .babelrc
Created March 9, 2017 11:37 — forked from perry-mitchell/.babelrc
Webpack2 + inject-loader2.0.1 (blog post)
{
"env": {
"testing": {
"presets": [
"es2015"
]
}
},
"presets": [
["es2015", { "modules": false }]
docker-dangling() {
docker rmi $(docker images -q -f dangling=true)
}
docker-exited() {
docker rm $(docker ps -aq -f status=exited)
}
docker-volumes() {
docker volume rm $(docker volume ls -q)
@vickiccole
vickiccole / docker-compose.service-discovery.yml
Last active October 12, 2016 08:10
Test docker compose file for nginx, consul and registrator setup.
version: "2"
services:
catalog:
build: ./ServiceCatalog
container_name: catalog
command: npm run start:dev
volumes:
- ./ServiceCatalog:/home/app/catalog
- /home/app/catalog/node_modules
@vickiccole
vickiccole / resize-images.zsh
Last active April 19, 2016 11:04
A wee function for resizing images using zsh and ImageMagick.
resizeimages() {
IMAGE_FILES=(*.jpg)
echo "Processing images"
for ((i=1; i <= ${#IMAGE_FILES[@]}; i+=1)); do
IMAGE_FILE=$IMAGE_FILES[i]
echo -ne "."
chmod a+r $IMAGE_FILE
convert $IMAGE_FILE -quality 75% -resize $1x$1 $IMAGE_FILE
done
@vickiccole
vickiccole / 1001albums.md
Last active March 21, 2016 13:58 — forked from znseaman/1001albums.md
Pitchfork's 1001 Albums You Must Hear Before You Die
50s
  • Sinatra, Frank – In the Wee Small Hours
  • Presley, Elvis – Elvis Presley (1956)
  • Louvin Brothers – Tragic Songs of Life
  • Prima, Louis – Wildest
  • Domino, Fats – This is Fats
  • Ellington, Duke – At Newport (1956)
  • Sinatra, Frank – Songs for Swingin’ Lovers!
  • Crickets – Chirping…