Skip to content

Instantly share code, notes, and snippets.

View jasonwbarnett's full-sized avatar

Jason Barnett jasonwbarnett

View GitHub Profile
#!/bin/bash
bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh) --dont-wait
apt-get update
apt-get install -y vim lsof default-jdk screen
[[ -d "/opt/minecraft" ]] || mkdir -p /opt/minecraft
wget -O /opt/minecraft/minecraft_server.jar "https://s3.amazonaws.com/Minecraft.Download/versions/1.12.1/minecraft_server.1.12.1.jar"

How to migrate grandcentral user's desktop to network share

  1. Login to grandcentral as admindsalvo
  2. In a folder, go to C:\Users
  3. Click on the user you're trying to migrate (e.g. gcasebeer)
  4. Rename the Desktop directory to Desktop.old
  5. Drag
  6. (\\dc4\Users$\\Desktop)
#!/bin/bash
sudo -s
apt-get clean
apt-get update
apt-get install openssh-server -y
passwd kubuntu
# enter password: AllVideo123! -- it will ask you to enter it twice.
#!/bin/bash
PROJECT="win-lust"
ZONE="us-east1-b"
gcloud compute --project $PROJECT instances create --zone $ZONE --machine-type "n1-standard-1" --subnet "winlust" --metadata-from-file="startup-script=master_startup.sh" --maintenance-policy "MIGRATE" --image "ubuntu-1604-xenial-v20170125" --image-project "ubuntu-os-cloud" --no-scopes $(seq -s ' ' -f "saltmaster%03g" 3)
gcloud compute --project $PROJECT instances create --zone $ZONE --machine-type "f1-micro" --subnet "winlust" --metadata-from-file="startup-script=minion_startup.sh" --maintenance-policy "MIGRATE" --image "ubuntu-1604-xenial-v20170125" --image-project "ubuntu-os-cloud" --no-scopes $(seq -s ' ' -f "saltminion%03g" 20)

DELETE ME

@jasonwbarnett
jasonwbarnett / main.go
Created May 29, 2015 19:19
This is an example of how we might nest multiple mux.Routers. This is especially useful if we want to later wrap our nested router with Negroni.
package hello
import (
"fmt"
"net/http"
"github.com/gorilla/mux"
)
func init() {
def mad_based_outlier(points, thresh=3.5):
if len(points.shape) == 1:
points = points[:,None]
median = np.median(points, axis=0)
diff = np.sum((points - median)**2, axis=-1)
diff = np.sqrt(diff)
med_abs_deviation = np.median(diff)
modified_z_score = 0.6745 * diff / med_abs_deviation
@jasonwbarnett
jasonwbarnett / 0_reuse_code.js
Last active August 29, 2015 14:15
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console