This file contains hidden or 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 | |
function join { local IFS="$1"; shift; echo "$*"; } | |
IFS=$'\n' | |
LIMIT=20 | |
STATS=$(netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n | grep -v Address | grep -v servers) | |
BLACKLISTED="" | |
BLACKLISTED_IPS=() | |
EMAIL="[email protected]" |
This file contains hidden or 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
// connect the distance sensor | |
#define trigPin 13 | |
#define echoPin 12 | |
// connect motor controller pins to Arduino digital pins | |
// motor one | |
int enA = 3; | |
int in1 = 4; | |
int in2 = 5; |
This file contains hidden or 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
diff --git a/gazebo/rendering/Camera.cc b/gazebo/rendering/Camera.cc | |
index 09a2430..b806a87 100644 | |
--- a/gazebo/rendering/Camera.cc | |
+++ b/gazebo/rendering/Camera.cc | |
@@ -22,7 +22,7 @@ | |
#endif | |
#include <sstream> | |
- | |
+#include <boost/format.hpp> |
This file contains hidden or 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
FROM ubuntu:14.04 | |
LABEL maintainer "NVIDIA CORPORATION <[email protected]>" | |
LABEL com.nvidia.volumes.needed="nvidia_driver" | |
RUN NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \ | |
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \ | |
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub && \ | |
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +2 > cudasign.pub && \ | |
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub && \ | |
echo "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64 /" > /etc/apt/sources.list.d/cuda.list | |
ENV CUDA_VERSION 8.0.61 |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am ptigas on github. | |
* I am ptigas (https://keybase.io/ptigas) on keybase. | |
* I have a public key ASBSUqKW2tdUJMV4sdaMMv0h1lMQ_ER2pY1K895deCmMoAo | |
To claim this, I am signing this object: |
This file contains hidden or 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
const puppeteer = require('puppeteer'); | |
const fs = require('fs'); | |
var program = require('commander'); | |
program.option('--urls [urls]', 'Urls file') | |
.option('--chromium [chromium_path]', 'Path of chromium', null) | |
.option('--output [output]', 'Output path') | |
.option('--trials [N]', 'Trials', 5) | |
.parse(process.argv); |
This file contains hidden or 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 json | |
import sys | |
import pandas as pd | |
import glob | |
def analyse(files): | |
''' | |
- latency (responseStart - requestStart) | |
- time to interactive (domInteractive - navigationStart) | |
- load time (loadEventStart - navigationStart) |
This file contains hidden or 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 | |
a=`cut -d ' ' -f 3 /proc/loadavg` set a = load avg. | |
if [ $(echo "$a > 0.25" | bc) -ne 0 ]; then #If load avg. is less than .25 | |
sudo shutdown | |
fi |
This file contains hidden or 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
string=$(curl -Is http://ptigas.com | head -1) | |
if [[ $string == *"OK"* ]]; then | |
echo "IPv4 is up" | |
else | |
echo "IPv4 is down" | |
curl 'https://www.btopenzone.com:8443/tbbLogon' -d "username=<username>&password=<password>" | |
fi |
This file contains hidden or 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 | |
# ssh-multi.sh - a script to ssh multiple servers over multiple tmux panes | |
# usage: type tmux then from inside tmux type ssh-multi.sh HOST1 HOST2 ... HOSTN | |
# Muayyad Alsadi, D.Kovalov | |
# https://gist.github.com/muayyad-alsadi/bd25845776bb6b4185ba/ | |
# https://gist.github.com/dmytro/3984680 | |
# Based on http://linuxpixies.blogspot.jp/2011/06/tmux-copy-mode-and-how-to-control.html | |
# Tested with Ubuntu 16.04 and tmux 2.1 | |
function error() { |