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 | |
for ip in `cat ips.list` | |
do | |
ssh $ip /sbin/iptables -I INPUT -s $1 -j DROP | |
done |
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 | |
for ip in `cat ips.list` | |
do | |
ssh $ip /sbin/iptables -D INPUT -s $1 -j DROP | |
done |
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 | |
LIST=`cat ips.list` | |
for ip in $LIST | |
do | |
scp blocked_ips.list $ip:/tmp | |
ssh $ip "bash update-blocked-ips; rm -f /tmp/blocked_ips.list" | |
done |
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 | |
iptables --flush | |
service iptables save | |
service iptables stop | |
service iptables start | |
BIPS=`cat /tmp/blocked_ips.list` |
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
#include <iostream> | |
int main() | |
{ | |
int num = 0; | |
int count = 0, sum = 0, i, j, p; | |
char c; |
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
module AIO | |
require 'nokogiri' | |
require 'open-uri' | |
class R | |
class << self | |
def class |
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
#!/usr/bin/env python | |
import sys | |
def permutations(input): | |
possibilities = set() | |
def _perm(prev, rem): | |
if len(rem): | |
for i in range(len(rem)): |
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 -X GET http://getpagetitle.herokuapp.com/get_title?url=https://www.facebook.com/ | |
{ | |
"return_code": 200, | |
"title": "Facebook - Log In or Sign Up", | |
"url": "https://www.facebook.com/" | |
} |
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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# All Vagrant configuration is done below. The "2" in Vagrant.configure | |
# configures the configuration version (we support older styles for | |
# backwards compatibility). Please don't change it unless you know what | |
# you're doing. | |
Vagrant.configure("2") do |config| | |
config.vm.define "foreman" do |foreman| |
OlderNewer