Wes Winham [email protected]
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
# Extracted using: $ unzip -p lib/pycharm.jar com/jetbrains/python/PyBundle.properties | grep -B1 INSP.NAME | grep '^#' | sed 's|Inspection||g' | sed -e 's|#\s\{,1\}|# noinspection |' | |
# noinspection PyPep8 | |
# noinspection PyPep8Naming | |
# noinspection PyTypeChecker | |
# noinspection PyAbstractClass | |
# noinspection PyArgumentEqualDefault | |
# noinspection PyArgumentList | |
# noinspection PyAssignmentToLoopOrWithParameter | |
# noinspection PyAttributeOutsideInit |
#!/usr/bin/python | |
# fix-xcode | |
# Rob Napier <[email protected]> | |
# Script to link in all your old SDKs every time you upgrade Xcode | |
# Create a directory called /SDKs (or modify source_path). | |
# Under it, put all the platform directories: | |
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
# Under those, store the SDKs: |
Wes Winham [email protected]
There are many tutorials floating around the web that almost get you a dynamic VPN in EC2. The goal of this tutorial is to be a one-stop-shop for this specific setup.
#!/bin/bash -ex | |
# Set some local variables | |
PRIVATE_IP=`curl -s http://169.254.169.254/latest/meta-data/local-ipv4` | |
PUBLIC_IP=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4` | |
VPN_DNSHOST=`grep -o "nameserver.*" /etc/resolv.conf | awk '{print $2}'` | |
yum install -y libreswan ppp xl2tpd | |
# Setup IPSEC Tunnel |
from dateutil import rrule | |
import datetime | |
# Generate ruleset for holiday observances on the NYSE | |
def NYSE_holidays(a=datetime.date.today(), b=datetime.date.today()+datetime.timedelta(days=365)): | |
rs = rrule.rruleset() | |
# Include all potential holiday observances | |
rs.rrule(rrule.rrule(rrule.YEARLY, dtstart=a, until=b, bymonth=12, bymonthday=31, byweekday=rrule.FR)) # New Years Day |
private func example1() { | |
let queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) | |
for i in 0..<10 { | |
dispatch_async(queue) { | |
NSLog("Start: \(i)") | |
sleep(3) | |
NSLog("End: \(i)") | |
} | |
} | |
} |
#include <stdio.h> | |
#include <string.h> | |
#include <sys/types.h> | |
#include <unistd.h> | |
#include <Security/Security.h> | |
// Compile with: | |
// gcc -o ourpath -framework CoreFoundation -framework Security main.c |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<!-- iOS 10, macOS Sierra, and friends bring a new logging subsystem that's | |
supposed to scale from the kernel, up to frameworks, and up to apps. It defaults | |
to a more regimented, privacy-focused approach that large apps and complex | |
systems need. | |
It, along with Activity Tracing introduced in iOS 8 and macOS Yosemite and the | |
Console app in macOS Sierra, hope to help you graduate from caveman debugging to |
Some useful Python one-liners taken from http://www.reddit.com/r/Python/comments/fofan/suggestion_for_a_python_blogger_figure_out_what/ | |
All modules listed are part of the standard library and should work with Python 2.6+ | |
How to use: | |
$ python -m [module] [arguments] | |
calendar - does default to displaying a yearly calendar, but it has a bunch of options (args are year or year month, options are HTML output, calendar locale, encoding, and some type-specific stuff, see python -m calendar -h) | |
cgi, dumps a bunch of information as HTML to stdout |