Skip to content

Instantly share code, notes, and snippets.

View josephmilla's full-sized avatar

Joseph Milla josephmilla

View GitHub Profile
@josephmilla
josephmilla / new_gist_file_0
Created June 16, 2015 19:27
wget website
wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--restrict-file-names=windows \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
@josephmilla
josephmilla / git-buffer-size
Created June 20, 2014 15:27
Increase git buffer size
git config http.postBuffer 524288000 #Set to 500MB
/**
* Name: Star Wars Imperial March
* Author: Joseph Milla
* Author URI: http://www.josephmilla.com
* Version: 1.0.0
* Tag: Arduino, Star Wars
*/
//SPEAKER (PWM pin)
int speakerPin = 11;
@josephmilla
josephmilla / git-aliases
Created June 20, 2014 14:57
Aliases for git
# Git Aliases
alias gco='git checkout'
alias gfo='git fetch origin'
alias grhod='git reset --hard origin/develop'
alias grhom='git reset --hard origin/master'
alias grv='git remote -v'
alias gtx='open /Applications/GitX.app'
alias gla='git log --oneline --graph --decorate --abbrev-commit'
alias grh='git reset --hard'
alias gcam='git commit -a -m'
@josephmilla
josephmilla / apt-get
Created July 8, 2014 15:53
apt-get Commands
Usage: apt-get [options] command
apt-get [options] install|remove pkg1 [pkg2 ...]
apt-get [options] source pkg1 [pkg2 ...]
apt-get is a simple command line interface for downloading and
installing packages. The most frequently used commands are update
and install.
Commands:
update - Retrieve new lists of packages
@josephmilla
josephmilla / Rockerfile
Created July 23, 2019 23:57 — forked from donaldguy/Rockerfile
jordan/rundeck + kindlyops oauth2 proxy with roles
#build us a binary for https://github.com/bitly/oauth2_proxy/pull/277
FROM golang
WORKDIR /go/src/github.com/bitly
RUN git clone https://github.com/kindlyops/oauth2_proxy.git
WORKDIR /go/src/github.com/bitly/oauth2_proxy
RUN git checkout github-teams-tweaks
RUN go get
# include patch from https://github.com/bitly/oauth2_proxy/pull/295
RUN curl https://github.com/donaldguy/oauth2_proxy/commit/8965e6b58a3afd8ad9f0f326f91b25253c88d523.patch | git apply --apply -
RUN go build
@josephmilla
josephmilla / killing-process
Created July 14, 2014 15:25
Killing process
// Grep the PID
ps aux | grep jekyll
// List process by port
lsof -wni tcp:4000
// Kill the process
kill PID
@josephmilla
josephmilla / nginx.conf
Created November 21, 2018 18:56 — 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
For my purposes I didn't use build dist because there was some confusion retrieving assets and such so I just stuck to development and kept things in the client folder
From there:
Use the FTP client of your choice to upload your angular-fullstack folder to /opt
In the terminal of your choice run: ssh root@your-digital-ocean-ip-address
cd into /opt/name-of-your-fullstack-project-folder
Then run node server/app.js
This will start up your server in development on port 9000.
To keep the server running:
Run these commands in order
>>> import numpy as np
>>> A = np.mat('[1 2;3 4]')
>>> A
matrix([[1, 2],
[3, 4]])
>>> A.I
matrix([[-2. , 1. ],
[ 1.5, -0.5]])
>>> b = np.mat('[5 6]')
>>> b