Skip to content

Instantly share code, notes, and snippets.

View zacharyblank's full-sized avatar

Zach Blank zacharyblank

  • Hurry
  • Portland
View GitHub Profile
root@ipsec-vpn:~# service ipsec start
ipsec: unrecognized service
Installing necessary dependencies...
Extracting templates from packages: 100%
Installing StrongSwan...
strongswan start/running
Downloading StrongSwan's source...
Configuring StrongSwan...
configure: error: GNU Multi Precision library gmp not found
Installing StrongSwan...
make: *** No rule to make target `install'. Stop.
Generating /var folder
Oct 13 16:39:53 ipsec-vpn charon: 09[NET] received packet: from 184.152.76.63[500] to 162.242.170.217[500]
Oct 13 16:39:53 ipsec-vpn charon: 09[NET] waiting for data on sockets
Oct 13 16:39:53 ipsec-vpn charon: 16[NET] received packet: from 184.152.76.63[500] to 162.242.170.217[500] (668 bytes)
Oct 13 16:39:53 ipsec-vpn charon: 16[ENC] parsed ID_PROT request 0 [ SA V V V V V V V V V V V V V V ]
Oct 13 16:39:53 ipsec-vpn charon: 16[CFG] looking for an ike config for 162.242.170.217...184.152.76.63
Oct 13 16:39:53 ipsec-vpn charon: 16[CFG] candidate: %any...%any, prio 28
Oct 13 16:39:53 ipsec-vpn charon: 16[CFG] found matching ike config: %any...%any with prio 28
Oct 13 16:39:53 ipsec-vpn charon: 16[IKE] received NAT-T (RFC 3947) vendor ID
Oct 13 16:39:53 ipsec-vpn charon: 16[IKE] received draft-ietf-ipsec-nat-t-ike vendor ID
Oct 13 16:39:53 ipsec-vpn charon: 16[IKE] received draft-ietf-ipsec-nat-t-ike-08 vendor ID
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/netlib/tcp.py", line 379, in request_thread
self.handle_connection(request, client_address)
File "/usr/local/lib/python2.7/dist-packages/libmproxy/proxy.py", line 549, in handle_connection
h.handle()
File "/usr/local/lib/python2.7/dist-packages/libmproxy/proxy.py", line 196, in handle
while self.handle_request(cc) and not cc.close:
File "/usr/local/lib/python2.7/dist-packages/libmproxy/proxy.py", line 239, in handle_request
sc.send(request)
File "/usr/local/lib/python2.7/dist-packages/libmproxy/proxy.py", line 66, in send
# Remove /v1/ from the request uri
map $request_uri $post_uri {
~^/v1(?P<uri_string>.*)$ $uri_string;
}
# Main Host
server {
listen 80;
server_name host;
@zacharyblank
zacharyblank / Vagrantfile
Created December 2, 2014 15:50
Basic Vagrant
Vagrant.configure("2") do |config|
config.vm.box = "trusty64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box"
config.vm.network :private_network, ip: "198.18.0.114"
config.vm.synced_folder "./web", "/vagrant/web", owner: "www-data", group: "www-data", mount_options: ["dmode=775,fmode=664"]
end
server {
listen 80;
server_name public.dev;
location / {
proxy_pass http://127.0.0.1:8020;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
description "Public node server"
author "Zachary Blank"
start on started mountall
stop on shutdown
# Automatically Respawn:
respawn
respawn limit 99 5
@zacharyblank
zacharyblank / gist:3bd004a2f5c619a0441a
Created December 10, 2014 14:17
Email with domain regex
/^[a-z0-9!#$%&'*+/=?^_`{|}~.-]+@example\.com$/i
this.get = function(data) {
var deferred = $q.defer();
resource.get(data, function(response) {
if (typeof response.data == 'object') {
deferred.resolve(new Venue(response.data));
} else {
deferred.reject();
}
}, function() {