Skip to content

Instantly share code, notes, and snippets.

@ironpillow
ironpillow / CCBlockTableViewDataSource.h
Created May 5, 2011 17:30 — forked from omnivector/CCBlockTableViewDataSource.h
Block based data source / delegate
//
// CCBlockTableViewDataSource.h
//
// Created by Tristan O'Tierney on 1/24/11.
//
#import <UIKit/UIKit.h>
@interface CCBlockTableViewDataSource : NSObject <UITableViewDataSource, UITableViewDelegate> {
@ironpillow
ironpillow / README.md
Last active May 10, 2016 21:10 — forked from e7d/README.md
[Debian] Build a Squid transparent proxy from source code
@ironpillow
ironpillow / README.md
Last active August 29, 2015 14:28 — forked from teffalump/README.md
OpenWRT adblock implementation

Description

In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.

Setup

The script must be copied to an OpenWRT router (gargoyle firmware works fine, too).

For example, if the router is located at 192.168.1.1:

@ironpillow
ironpillow / plwatch.sh
Created April 25, 2016 05:06 — forked from lrq3000/plwatch.sh
A simple bash script to watch packets loss using ping on Unix/Linux
#!/bin/bash
# Packets Loss Watch
# Simple SHELL script for Linux and UNIX system monitoring with
# ping command
#
# Copyright (c) 2006 nixCraft project <http://www.cyberciti.biz/fb/>
# Copyleft 2013 Stephen Larroque
# This script is licensed under GNU GPL version 2.0 or above
#
# This script was inspired by a nixCraft script http://www.cyberciti.biz/tips/simple-linux-and-unix-system-monitoring-with-ping-command-and-scripts.html
@ironpillow
ironpillow / .bashrc
Created May 8, 2016 08:32 — forked from vsouza/.bashrc
Golang 1.5 setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@ironpillow
ironpillow / ping.rs
Created August 10, 2016 19:18 — forked from nixpulvis/ping.rs
A simple Ping implementation in Rust.
#![feature(ip_addr, raw)]
extern crate pnet;
use std::net::{IpAddr, Ipv4Addr};
use pnet::transport::TransportChannelType::Layer4;
use pnet::transport::TransportProtocol::Ipv4;
use pnet::transport::transport_channel;
use pnet::packet::ip::IpNextHeaderProtocols;
use pnet::packet::Packet;
@ironpillow
ironpillow / main.rs
Created January 3, 2017 21:10 — forked from johshoff/main.rs
scan ips
use std::thread;
use std::net::TcpStream;
fn check_open_port(host: &str, port: u16) -> bool {
TcpStream::connect((host, port)).is_ok()
}
fn main() {
const PORT : u16 = 22;
@ironpillow
ironpillow / angry_wifi.sh
Created April 22, 2017 03:11 — forked from lg/angry_wifi.sh
auto disconnects clients with a low signal strength on LEDE / OpenWRT
#!/bin/ash
#
# angry_wifi.sh
#
# auto disconnects clients with a low signal strength on LEDE / OpenWRT. great
# for clients who hold onto a lower-signal-strength accesspoint instead of
# roaming. before running, make sure to download the latest MAC addresses with:
#
# wget --no-check-certificate -O - 'https://services13.ieee.org/RST/standards-ra-web/rest/assignments/download/?registry=MAC&text=apple' | cut -d, -f2 > apple_mac_addresses
#
@ironpillow
ironpillow / wireless-link-wds.sh
Created September 20, 2017 22:09 — forked from braian87b/wireless-link-wds.sh
How to setup Wireless Links to avoid Wired backbone using WDS on Atheros for OpenWRT / LEDE
@ironpillow
ironpillow / build-openwrt.sh
Created September 29, 2017 04:44 — forked from lool/build-openwrt.sh
OpenWRT build script
#!/bin/sh
set -e -x
# for Ubuntu 16.04
#PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion mercurial"
PACKAGES="git build-essential libssl-dev libncurses5-dev unzip gawk python subversion"
sudo apt -y install $PACKAGES
if ! [ -d openwrt ]; then