This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
####################################### | |
#Remote settings | |
USER=USERNAME | |
HOST=HOSTNAME | |
PORT=22 | |
#Local settings | |
INAME=Wi-Fi | |
LPORT=8080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Can be snapshot or release | |
DEFAULTREVISION=release | |
# Pull out latest snapshot version | |
REVISION=${1-$DEFAULTREVISION} | |
REGEX="(?<=$REVISION\": \").*?[^\\\\](?=\")" | |
VERSION=`curl -silent "http://s3.amazonaws.com/Minecraft.Download/versions/versions.json" | grep -Po "$REGEX"` | |
if [ "$VERSION" = "" ]; then | |
echo "Invalid Version"; exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AddCSLuaFile() | |
player_manager.AddValidModel("ranger1", "models/metro2033/nikout/ranger1.mdl") | |
player_manager.AddValidModel("ranger1_pl", "models/metro2033/nikout/player/ranger1.mdl") | |
player_manager.AddValidModel("ranger2_pl", "models/metro2033/nikout/player/ranger2.mdl") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pip install paho-mqtt | |
#pip install git+https://github.com/mbr/asciitree.git | |
import asciitree | |
import paho.mqtt.client as mqtt | |
import sys | |
from collections import defaultdict | |
from time import sleep | |
tr = asciitree.LeftAligned() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Go to script directory | |
BINDIR=$(dirname "$(readlink -fn "$0")") | |
cd "$BINDIR" | |
### Configuration ### | |
XMS="1G" | |
XMX="1G" | |
JAR="minecraft_server.jar" | |
JAVA_BIN="../java/jdk1.8.0_45/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define READ_COUNT 5 | |
float volts[READ_COUNT]; | |
void setup() | |
{ | |
Serial.begin(9600); | |
} | |
void loop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$1" = "-h" -o "$1" = "--help" ]; then cat <<EOF | |
appify v3.0.0 for Mac OS X - http://mths.be/appify | |
Creates the simplest possible Mac app from a shell script. | |
Appify takes a shell script as its first argument: | |
`basename "$0"` my-script.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# How this works: | |
# Curl -> Grabs the organization repos from the github api | |
# grep -> Filter to only clone_url's | |
# grep -> Select the url from that line | |
# xargs -> For each line, run git clone [line] | |
curl -s "https://api.github.com/orgs/${1}/repos?per_page=200" | grep clone_url | grep -oh "https.*git" | xargs -L1 git clone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sklearn | |
import tensorflow as tf | |
from sklearn import datasets | |
iris = datasets.load_iris() | |
# Convert targets to one hot | |
targets_onehot = [0] * len(iris.target) | |
for i,target in enumerate(iris.target): | |
targets_onehot[i] = [0] * 3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Docker %i container | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Restart=always | |
ExecStart=/usr/bin/docker start -a %I | |
ExecStop=/usr/bin/docker stop -t 2 %I |
OlderNewer