These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.
Install the following packages:
apt-get install -y strongswan xl2tpd
Configure strong swan
AZHU.storage = { | |
save : function(key, jsonData, expirationMin){ | |
if (!Modernizr.localstorage){return false;} | |
var expirationMS = expirationMin * 60 * 1000; | |
var record = {value: JSON.stringify(jsonData), timestamp: new Date().getTime() + expirationMS} | |
localStorage.setItem(key, JSON.stringify(record)); | |
return jsonData; | |
}, | |
load : function(key){ | |
if (!Modernizr.localstorage){return false;} |
var pattern = /^[a-z][a-z0-9_]*(\.[a-z0-9_]+)+[0-9a-z_]$/i; | |
[ | |
"me.unfollowers.droid", | |
"me_.unfollowers.droid", | |
"me._unfollowers.droid", | |
"me.unfo11llowers.droid", | |
"me11.unfollowers.droid", | |
"m11e.unfollowers.droid", | |
"1me.unfollowers.droid", |
{ | |
/* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
* | |
* This is a pretty good set, especially considering that many emacs bindings | |
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
* perhaps a few more, are already built into the system. | |
* | |
* BEWARE: | |
* This file uses the Option key as a meta key. This has the side-effect | |
* of overriding Mac OS keybindings for the option key, which generally |
# post_loc.txt contains the json you want to post | |
# -p means to POST it | |
# -H adds an Auth header (could be Basic or Token) | |
# -T sets the Content-Type | |
# -c is concurrent clients | |
# -n is the number of requests to run in the test | |
ab -p post_loc.txt -T application/json -H 'Authorization: Token abcd1234' -c 10 -n 2000 http://example.com/api/v1/locations/ |
# This small script uses the 'srt' gem to parse the srt file | |
# It solves problems with certain subtitle files with empty lines that make Flex crash | |
# You can use it with files, folders with files or even folders with subfolders with files (God bless Recursivity) | |
# USAGE: ruby fix-srt.rb file/to/fix.srt | |
# USAGE: ruby fix-srt.rb folder/with/files/to/fix | |
# USAGE: ruby fix-srt.rb folders/with/subfolders/to/fix | |
require 'rubygems' | |
require 'srt' | |
class StrFixer |
These are my notes for connecting to a meraki client vpn from ubuntu 16.04. This configuration assumes you are using a psk for the ipsec auth.
Install the following packages:
apt-get install -y strongswan xl2tpd
Configure strong swan
import ( | |
"mime" | |
"net/http" | |
"strings" | |
) | |
// Determine whether the request `content-type` includes a | |
// server-acceptable mime-type | |
// | |
// Failure should yield an HTTP 415 (`http.StatusUnsupportedMediaType`) |
# Image neeeds to have ssh-client | |
image: docker:git | |
services: | |
- docker:dind | |
stages: | |
- staging | |
before_script: | |
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY |
git remote add upstream https://github.com/whoever/whatever.git
git fetch upstream
import provinces from 'china-division/dist/provinces.json'; | |
import cities from 'china-division/dist/cities.json'; | |
import areas from 'china-division/dist/areas.json'; | |
areas.forEach((area) => { | |
const matchCity = cities.filter(city => city.code === area.cityCode)[0]; | |
if (matchCity) { | |
matchCity.children = matchCity.children || []; | |
matchCity.children.push({ | |
label: area.name, |