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
curl -s checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//' |
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
lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL |
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
virt-cat -d vm1 /var/lib/dhcp/dhclient.eth0.leases |
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 java.util.Arrays; | |
/** | |
* Created by IntelliJ IDEA. | |
* User: mifang | |
* Date: 12/21/11 | |
* Time: 2:48 PM | |
* To change this template use File | Settings | File Templates. | |
*/ | |
public class ArrayCopyTest { |
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
// DO NOT CHANGE // | |
const gulp = require('gulp'); | |
const webpack = require('webpack'); | |
const WebpackDevServer = require('webpack-dev-server'); | |
const gwebpack = require('webpack-stream'); | |
const browserSync = require('browser-sync'); | |
const runSequence = require('run-sequence'); | |
const debug = require('gulp-debug'); | |
const cache = require('gulp-cached'); |
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 | |
while true | |
do | |
if ping -c 1 -w 3 192.168.2.67 &> /dev/null || hcitool scan | grep -q -E "ming-macbook|Ming's iPhone" ; then | |
echo "welcome back. turning screen on" | |
echo 0 | sudo tee /sys/class/backlight/rpi_backlight/bl_power | |
else | |
echo "you're gone. turning screen off" | |
echo 1 | sudo tee /sys/class/backlight/rpi_backlight/bl_power |
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
boot2docker ssh sudo date --set \"$(env TZ=UTC date '+%F %H:%M:%S')\" |
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
iptables -A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -m recent --set --name SSH --rsource | |
iptables -A INPUT -p tcp -m tcp --dport 22 -m recent --rcheck --seconds 30 --hitcount 4 --rttl --name SSH --rsource -j REJECT --reject-with tcp-reset | |
iptables -A INPUT -p tcp -m tcp --dport 22 -m recent --rcheck --seconds 30 --hitcount 3 --rttl --name SSH --rsource -j LOG --log-prefix "SSH brute force " | |
iptables -A INPUT -p tcp -m tcp --dport 22 -m recent --update --seconds 30 --hitcount 3 --rttl --name SSH --rsource -j REJECT --reject-with tcp-reset | |
iptables -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT | |
#based on https://rudd-o.com/linux-and-free-software/a-better-way-to-block-brute-force-attacks-on-your-ssh-server |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
package main | |
import ( | |
"context" | |
"flag" | |
"os" | |
"os/exec" | |
"go.uber.org/cadence/.gen/go/cadence/workflowserviceclient" | |
"go.uber.org/cadence/activity" |