Skip to content

Instantly share code, notes, and snippets.

View martijnw's full-sized avatar

Martijn martijnw

  • Wherever there's free Wi-Fi.
View GitHub Profile
@jinzhu
jinzhu / ArchLinux VPN
Created March 27, 2011 07:12
a script to quick setup vpn server in archlinux
#!/bin/bash
# [email protected]
# thanks sushiyant ([email protected])
pacman -S iptables pptpd
echo "iptables -A INPUT -i ppp+ -j ACCEPT" >> /etc/rc.local
echo "iptables -A OUTPUT -o ppp+ -j ACCEPT" >> /etc/rc.local
echo "iptables -A INPUT -p tcp --dport 1723 -j ACCEPT" >> /etc/rc.local
echo "iptables -A INPUT -p 47 -j ACCEPT" >> /etc/rc.local
@BFTrick
BFTrick / my-woocommerce-modifications.php
Last active August 7, 2017 09:03
A WordPress plugin that modifies the WooCommerce category page. It remove the title, price, and add to cart button. Reference this WordPress Answers question (http://wordpress.stackexchange.com/questions/61398/hide-price-title-in-store-thumbnail-dispay) to see why I made it.
<?php
/*
Plugin Name: My WooCommerce Modifications
Plugin URI: http://woothemes.com/
Description: Modificatinos to my WooCommerce site
Version: 1.0
Author: Patrick Rauland
Author URI: http://www.patrickrauland.com/
License: GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@abythell
abythell / thingspeak-install.sh
Last active May 22, 2023 18:40
Bash script to install a Thingspeak server on Ubuntu Server 12.04. Raspbian (2014-01-07-wheezy-raspbian). and possibly Debian-based distros.
#!/bin/bash
# Automatic install of Thingspeak server on Ubuntu 12.04 / Raspbmc / Debian (?)
# Updated to use ruby 2.1.4
## Install required packages
sudo apt-get update
sudo apt-get -y install build-essential git mysql-server mysql-client libmysqlclient-dev libxml2-dev libxslt-dev libssl-dev libsqlite3-dev
## Install ruby
wget http://cache.ruby-lang.org/pub/ruby/2.1/ruby-2.1.4.tar.gz
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@KrustyHack
KrustyHack / web_scraping_emails_website.sh
Last active March 5, 2024 10:26
Scrape a website with wget and get uniques emails from it or scrap websites whois to get email
#!/bin/bash
DOMAINS=$1
TMP_DIR=$2
if [[ "$DOMAINS" == "" || "$TMP_DIR" == "" ]] ; then
echo -e "Usage : script.sh DOMAINS.txt (with one domain per line) TMP_DIR"
echo -e "Example : ./script.sh mydomains.txt /tmp"
exit 1
fi
@martijnw
martijnw / ArchLinux VPN
Created May 18, 2016 21:58 — forked from jinzhu/ArchLinux VPN
a script to quick setup vpn server in archlinux
#!/bin/bash
# [email protected]
# thanks sushiyant ([email protected])
pacman -S iptables pptpd
echo "iptables -A INPUT -i ppp+ -j ACCEPT" >> /etc/rc.local
echo "iptables -A OUTPUT -o ppp+ -j ACCEPT" >> /etc/rc.local
echo "iptables -A INPUT -p tcp --dport 1723 -j ACCEPT" >> /etc/rc.local
echo "iptables -A INPUT -p 47 -j ACCEPT" >> /etc/rc.local
@chuckixia
chuckixia / gist:501054f21e5ae614631a634fbb6cd38e
Last active June 28, 2017 10:16
bitcoin addresses for wanacry ransomware
quick hack to extract bitcoin address (OS X):
strings -n 34 FILENAME | grep -E '^.{34}$'
better hacky shell script:
strings FILE | grep -E '^[13][a-km-zA-HJ-NP-Z1-9]{25,34}$'
Hash: ed01ebfbc9eb5bbea545af4d01bf5f1071661840480439c6e5babe8e080e41aa
115p7UMMngoj1pMvkpHijcRdfJNXj6LrLn
12t9YDPgwueZ9NyMgw519p7AA8isjr6SMw
13AM4VW2dhxYgXeQepoHkHSQuy6NgaEb94