Skip to content

Instantly share code, notes, and snippets.

View bo01ean's full-sized avatar

Nathan Trujillo bo01ean

View GitHub Profile
@bo01ean
bo01ean / rip.sh
Last active October 20, 2019 06:08
### pip install youtube-dl
### rip "https://www.youtube.com/watch?v=7jR1JWQwqNo"
rip() {
youtube-dl -f bestaudio --extract-audio --audio-format mp3 --audio-quality 0 "$1"
}
@bo01ean
bo01ean / webpack.config.js
Created February 28, 2019 09:20
swc-loader for create-react-app webpack
'use strict';
const fs = require('fs');
const path = require('path');
const webpack = require('webpack');
const resolve = require('resolve');
const PnpWebpackPlugin = require('pnp-webpack-plugin');
const HtmlWebpackPlugin = require('html-webpack-plugin');
const CaseSensitivePathsPlugin = require('case-sensitive-paths-webpack-plugin');
const InlineChunkHtmlPlugin = require('react-dev-utils/InlineChunkHtmlPlugin');
function installTeamCityAgent()
{
TARGET=~/Desktop/TC/
CONF=conf/buildAgent.properties
rm -rf $TARGET
cd /tmp/
rm buildAgent.zip
curl -O https://teamcity.illumina.com/update/buildAgent.zip
PIP=
# Install python3 you don't have python3:
if python -V 2>&1 | grep -qE "3\.[0-9]\.[0-9]"; then
echo "python3 found as system python. we can just use pip."
PIP=pip
elif command -v python3 1>/dev/null; then
echo "python3 found on path, wiring in pip3"
PIP=pip3
else
echo "We need python3"
sudo launchctl unload /Library/launchdaemons/com.cylance.agent_service.plist
import numpy as np
import pandas as pd
import inspect
import os
import datetime as dt
import pylab
import subprocess
import tempfile
import plotly.plotly as py
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew tap homebrew/science
brew install octave
## Install Python3 / Jupyter
brew install python3
BUILDDIR=/tmp/cudabuild
mkdir -p $BUILDDIR
curl -O https://gist.githubusercontent.com/bo01ean/763a604d30c257b2589d530eb7f40027/raw/6583646eed75ebf945da246e56f549455132adef/install.sh
curl -O https://gist.githubusercontent.com/bo01ean/f42540ae42c67b39f1f386a3cd6f970f/raw/6b2663389ba44fc3ccc1ed1f65e17e2408ebaff3/commandMaps.sh
chmod +x install.sh commandMaps.sh
sudo ./install.sh
@bo01ean
bo01ean / nginx
Last active January 13, 2017 23:01 — forked from vdel26/nginx
Openresty init.d script
#!/bin/bash
#
# chkconfig: 2345 55 25
# Description: Nginx init.d script, put in /etc/init.d, chmod +x /etc/init.d/nginx
# For Debian, run: update-rc.d -f nginx defaults
# For CentOS, run: chkconfig --add nginx
#
### BEGIN INIT INFO
# Provides: nginx
# Required-Start: $all
@bo01ean
bo01ean / openresty.sls
Last active August 2, 2016 18:50 — forked from pinge/openresty.sls
NGINX OpenResty salt formula
{% set local_source = '/usr/local/src' -%}
{% set output_folder = '/tmp' -%}
{% set nginx = pillar.get('nginx', {}) -%}
{% set openresty_config = nginx.get('openresty', {}) -%}
{% set openresty_version = openresty_config.get('version', '1.9.7.5') -%}
{% set openresty_checksum = openresty_config.get('checksum', 'sha1=e4313c35364c4551523eeb751fcfcc4b32c89b56') -%}
{% set openresty_package = 'ngx_openresty-' + openresty_version + '.tar.gz' -%}