Skip to content

Instantly share code, notes, and snippets.

Avatar

Sophia Parafina spara

  • Count Down City
  • Twitter @spara
View GitHub Profile
@spara
spara / check_open_ports.sh
Created May 9, 2017
find open ports using netstat
View check_open_ports.sh
sudo netstat -plunt
View Review_of_Protips_for_Dockerizing_Node.md

Protip 1: Create a Non-root User

This is good advice particularly in Linux

RUN groupadd -r nodejs \
   && useradd -m -r -g nodejs nodejs

USER nodejs
View Rails_on_Docker.md

Rails on Docker

Note: many issues listed below are not specific to Rails or to Ruby. They can also exist in other languages or web frameworks presenting similar challeneges. It is important to note these challenges, because they can impede the workflow and best practices taught and used by Rails practitioners.

Challenges and Remediations

Different versions of Ruby

There are many different versions of Ruby in use. This is very unique, in that, in the Python world, you have many versions, but almost everyone will be using the last 2.X or the last 3.X. In the Java world, most use cases are covered by the last two major releases of either Java released by Oracle or on OpenJDK.

View mysql_startup-osx.md

sudo launchctl load -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

sudo launchctl unload -F /Library/LaunchDaemons/com.oracle.oss.mysql.mysqld.plist

View keybase.md

Keybase proof

I hereby claim:

  • I am spara on github.
  • I am spara (https://keybase.io/spara) on keybase.
  • I have a public key ASBSciQqQqGDXOL9fPAm8Fu13Pu-BgfkxcuNmxi6dVo0dwo

To claim this, I am signing this object:

@spara
spara / Makefile
Created Jul 19, 2016 — forked from yanofsky/Makefile
This is workflow for downloading, processing, and mosaicing Landsat scenes, as a Makefile
View Makefile
# lansatutil directory
LANDSAT = ~/landsat
# scenes to target
LANDSAT_IDS = \
LC81220442016038LGN00 \
LC81220452016038LGN00 \
LC81210442014281LGN00 \
LC81210452014281LGN00
@spara
spara / Useful_docker_commands.md
Last active May 16, 2016
useful docker commands
View Useful_docker_commands.md

Stopping and removing containers and volumes

Note: If you get a "no space left on device error", you may have stopped containers taking up space.

Show all containers, running and stopped

docker ps -a

One liner to stop / remove all of Docker containers:

@spara
spara / Landsat 8 gdal processing
Last active Mar 28, 2017 — forked from andymason/Landsat 8 gdal processing
Added projection wrap correction
View Landsat 8 gdal processing
#! /bin/bash
# Convert Landsat 8 GeoTIFF images into RGB pan-sharpened JPEGs.
#
# Requirements:
# * gdal http://www.mapbox.com/tilemill/docs/guides/gdal/
# * convert (image-magick)
#
# Reference info:
# http://www.mapbox.com/blog/putting-landsat-8-bands-to-work/
@spara
spara / install_pyicu.sh
Created Mar 15, 2016
install pyicu on el capitan
View install_pyicu.sh
brew install icu4c
CFLAGS=-I/usr/local/opt/icu4c/include LDFLAGS=-L/usr/local/opt/icu4c/lib pip install pyicu
View index_events_by_topic.py
import json, codecs
topics = ["CoreOS",
"Google",
"Microsoft",
"Joyent",
"ECS",
"Rancher",
"Hashicorp",