Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# Automaticlly install pptpd on Amazon EC2 Amazon Linux | |
# | |
# Ripped from http://blog.diahosting.com/linux-tutorial/pptpd/ | |
# pptpd source rpm packing by it's authors | |
# | |
# WARNING: | |
# first ms-dns setting to 172.16.0.23, 172.16.0.23 was showing on my | |
# /etc/resolv.conf, I'm not sure this is the same on all Amazon AWS zones. | |
# | |
# You need to adjust your "Security Groups" which you are using too. |
import socket, sys, os | |
print "][ Attacking " + sys.argv[1] + " ... ][" | |
print "injecting " + sys.argv[2]; | |
def attack(): | |
#pid = os.fork() | |
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
s.connect((sys.argv[1], 80)) | |
print ">> GET /" + sys.argv[2] + " HTTP/1.1" | |
s.send("GET /" + sys.argv[2] + " HTTP/1.1\r\n") | |
s.send("Host: " + sys.argv[1] + "\r\n\r\n"); |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
by Jonathan Rochkind, http://bibwild.wordpress.com
Capistrano automates pushing out a new version of your application to a deployment location.
I've been writing and deploying Rails apps for a while, but I avoided using Capistrano until recently. I've got a pretty simple one-host deployment, and even though everyone said Capistrano was great, every time I tried to get started I just got snowed under not being able to figure out exactly what I wanted to do, and figured I wasn't having that much trouble doing it "manually".
# This file should be placed on the directory of ~/blog/config | |
upstream unicorn { | |
server unix:/tmp/unicorn.todo.socket fail_timeout=0; | |
} | |
server { | |
listen 80 default; | |
#server_name example.com; | |
root /home/username/blog/public; |
<?php | |
/* | |
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: | |
:: Formerly known as::: | |
:: GIFEncoder Version 2.0 by László Zsidi, http://gifs.hu | |
:: | |
:: This class is a rewritten 'GifMerge.class.php' version. | |
:: | |
:: Modification: |
<?php | |
$result = array(); | |
$result_html = ''; | |
if (isset($_POST['domain']) && !empty($_POST['domain'])) { | |
$domain_regex = '/[a-z\d][a-z\-\d\.]+[a-z\d]/i'; | |
if (preg_match($domain_regex, $_POST['domain'])) { | |
if ($url = parse_url($_POST['domain'])) { //compatible when user post an url instead of a domain | |
if (isset($url['host'])) { | |
$result = dns_get_record($url['host'], DNS_A + DNS_AAAA + DNS_CNAME); | |
} else if (isset($url['path'])) { |
// Use the router(s) for any internal (relative) links, unless it has a | |
// `data-bypass` attribute or is `target=_blank` | |
$(document).on('click', 'a:not([data-bypass],[target])', function(evt) { | |
var href = $(this).attr('href'), | |
protocol = this.protocol + '//'; | |
// For <a href="#"> links, we always want to preventDefault to avoid having to do | |
// this within each individual Backbone View event function. | |
// (However don't preventDefault on #something URLs in case we need to jump down a page.) |
#!/usr/bin/env ruby | |
# gem install sinatra --no-document | |
# gem install github-markdown --no-document | |
require 'sinatra' | |
require 'github/markdown' | |
set :port, 3000 | |
get '/' do | |
<<-EOT | |
<!DOCTYPE html> |
Title | URI | |
---|---|---|
Flurry by Yahoo | https://dev.flurry.com/secure/signup.do | |
Google NikCollection | https://dl.google.com/edgedl/photos/nikcollection-full-1.2.11.dmg | |
Bitbucket | http://bitbucket.org/ | |
SoftLayer | http://softlayer.com/ | |
VirtualBox | http://download.virtualbox.org/virtualbox/5.0.16/VirtualBox-5.0.16-105871-OSX.dmg | |
Docker Hub | https://hub.docker.com/ | |
Oracle | http://oracle.com/ | |
Java | http://java.com | |
Sun | http://sun.com |