sudo apt-get install openvpn
sudo cp -r /usr/share/doc/openvpn/examples/easy-rsa/2.0 /etc/openvpn/easy-rsa2
cd /etc/openvpn/easy-rsa2
| RUBY_GC_HEAP_FREE_SLOTS=600000 | |
| RUBY_GC_HEAP_GROWTH_FACTOR=1.25 | |
| RUBY_GC_HEAP_GROWTH_MAX_SLOTS=300000 | |
| RUBY_GC_HEAP_INIT_SLOTS=600000 | |
| RUBY_GC_HEAP_OLDOBJECT_LIMIT_FACTOR=1.3 | |
| RUBY_GC_MALLOC_LIMIT=64000000 | |
| RUBY_GC_OLDMALLOC_LIMIT=64000000 | |
| RUBY_HEAP_FREE_MIN=12500 | |
| RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
| RUBY_HEAP_SLOTS_INCREMENT=100000 |
| client | |
| dev tun | |
| proto tcp | |
| remote 192.168.1.1 1194 | |
| resolv-retry infinite | |
| nobind | |
| persist-key | |
| persist-tun | |
| ca [inline] | |
| cert [inline] |
| #! /usr/bin/env python2 | |
| # Requires: PIL, colormath | |
| # | |
| # Improved algorithm now automatically crops the image and uses much | |
| # better color matching | |
| from PIL import Image, ImageChops | |
| from colormath.color_objects import RGBColor | |
| import argparse | |
| import math |
| =Navigating= | |
| visit('/projects') | |
| visit(post_comments_path(post)) | |
| =Clicking links and buttons= | |
| click_link('id-of-link') | |
| click_link('Link Text') | |
| click_button('Save') | |
| click('Link Text') # Click either a link or a button | |
| click('Button Value') |
| # Code loops around each of the windows | |
| # that the current user has open and switches | |
| # focus to each of them in rotation... 100 times. | |
| 100.times do |x| | |
| windows = client.extapi.window.enumerate | |
| windows.each do |winder| | |
| if winder[:title] != 'Default IME' | |
| result = client.railgun.user32.SetForegroundWindow(winder[:handle]) | |
| end |
| class String | |
| UNACCENT_HASH = { | |
| 'A' => 'ÀÁÂÃÄÅĀĂǍẠẢẤẦẨẪẬẮẰẲẴẶǺĄ', | |
| 'a' => 'àáâãäåāăǎạảấầẩẫậắằẳẵặǻą', | |
| 'C' => 'ÇĆĈĊČ', | |
| 'c' => 'çćĉċč', | |
| 'D' => 'ÐĎĐ', | |
| 'd' => 'ďđ', | |
| 'E' => 'ÈÉÊËĒĔĖĘĚẸẺẼẾỀỂỄỆ', | |
| 'e' => 'èéêëēĕėęěẹẻẽếềểễệ', |
| ##!/bin/bash | |
| USER=teamcity | |
| INSTALL=/home/$USER/BuildAgent | |
| INSTANCE=1 | |
| # ------------- | |
| SCRIPT=$INSTALL/bin/agent.sh | |
| #!/bin/bash | |
| usage() | |
| { | |
| cat << EOF | |
| usage: $0 options | |
| This script set ownership for all table, sequence and views for a given database | |
| Credit: Based on http://stackoverflow.com/a/2686185/305019 by Alex Soto |