Skip to content

Instantly share code, notes, and snippets.

View fijimunkii's full-sized avatar
🦁
𐂃͠

Harrison Powers fijimunkii

🦁
𐂃͠
View GitHub Profile
@fijimunkii
fijimunkii / gist:5f4929712cbc833fe9ec
Created December 4, 2014 22:01
pid and env tips
let's say you want to know the environment of a *running* process
on linux, you can: cat /proc/PID/environ
(as the user)
this is useful, because if you think an environment variable setting has changed, but a process wasn't restarted, you can still see what environment variables it's running with
or, if you're not 100% sure that an env var got picked up, you can find out that way as well
@fijimunkii
fijimunkii / sudoless_npm
Created March 17, 2015 00:00
chown npm to install without sudo
sudo chown -R $USER:$GROUP ~/.npm
@fijimunkii
fijimunkii / starwars.sh
Last active August 30, 2015 22:46 — forked from alanb1501/starwars.sh
Reads a random starwars quote in each voice available via the `say` command. (OS X only)
#!/usr/bin/env bash
for voice in $(say -v ? | perl -pe 's/^(.*?)\s.*$/$1/'); do quote=$(curl -s http://www.iheartquotes.com/api/v1/random?source=starwars | perl -pe 's/\[starwars.*?$//g'); echo $voice; say -v $voice $quote; done
@fijimunkii
fijimunkii / tsws
Last active September 6, 2015 17:38 — forked from dfletcher/tsws
Totally simple web server using Bash and netcat (nc)
#!/bin/bash
# --------------------------------
# Totally Simple Web Server (TSWS)
# --------------------------------
#
# (c) 2015 Dave Fletcher
# All Rights Reserved
#
# This is free and unencumbered software released into the public domain.
@fijimunkii
fijimunkii / osx-10.10-setup.md
Last active September 11, 2015 18:38 — forked from kevinelliott/osx-10.10-setup.md
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@fijimunkii
fijimunkii / install-comodo-ssl-cert-for-nginx.rst
Created September 23, 2015 17:04 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert

@fijimunkii
fijimunkii / gist:f5570e895e4f590d9135
Created September 27, 2015 16:42
certificate key matcher
openssl x509 -noout -modulus -in certificate.crt | openssl md5
openssl rsa -noout -modulus -in privateKey.key | openssl md5
openssl req -noout -modulus -in CSR.csr | openssl md5
@fijimunkii
fijimunkii / nginx.conf
Created October 16, 2015 12:32 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@fijimunkii
fijimunkii / resource_alloc_docker.md
Created October 21, 2015 12:45 — forked from afolarin/resource_alloc_docker.md
Resource Allocation in Docker

#Container Resource Allocation Options in docker-run You have various options for controlling resources (cpu, memory, disk) in docker. These are principally via the docker-run command options.

##Dynamic CPU Allocation -c, --cpu-shares=0
CPU shares (relative weight, specify some numeric value which is used to allocate relative cpu share)

##Reserved CPU Allocation