install packages first:
yay -S xl2tpd strongswan networkmanager-l2tp
ref: https://wiki.archlinux.org/index.php/Openswan_L2TP/IPsec_VPN_client_setup
/** | |
* ex) | |
* <input type="text" class="jq-auto-adjust" data-base-width="60" data-base-window-width="1280"> | |
* $('.jq-auto-adjust').autoAdjust(); | |
*/ | |
(function($) { | |
'use strict'; | |
var methods = { | |
init: function(options) { |
fun <T1, T2> safe(t1: T1?, t2: T2?): Pair<T1, T2>? { | |
return if (t1 == null || t2 == null) null else Pair(t1, t2) | |
} | |
fun <T1, T2, T3> safe(t1: T1?, t2: T2?, t3: T3): Triple<T1, T2, T3>? { | |
return if (t1 == null || t2 == null || t3 == null) null else Triple(t1, t2, t3) | |
} | |
// Usage (case in fragments) | |
val (context, activity) = safe(context, activity) ?: return |
if (val date = arguments?.getSerializable(ARG_DATE) as LocalDate) { | |
... |
/** | |
* $.backboneSortable | |
*/ | |
(function(){ | |
var methods = { | |
init: function(options) { | |
var settings = $.extend({ | |
// defaults | |
}, options); |
/** | |
* Usage: | |
* var models = [{ attributes: { name: 'Scott' } }, { attributes: { name: 'Tiger' } }]; | |
* deepPluck(models, 'attributes', 'name'); //=> ['Scott', 'Tiger'] | |
*/ | |
var deepPluck = function(array) { | |
var copiedArray = [].concat(array); | |
for (var i = 1; i < arguments.length; i++) { | |
copiedArray = _.pluck(copiedArray, arguments[i]); | |
} |
install packages first:
yay -S xl2tpd strongswan networkmanager-l2tp
ref: https://wiki.archlinux.org/index.php/Openswan_L2TP/IPsec_VPN_client_setup
#!/bin/bash | |
EMULATOR=~/Library/Android/sdk/tools/emulator | |
if [ $# -ne 1 ]; then | |
echo "ERROR: Please specify the target AVD from the list below" 1>&2 | |
$EMULATOR -list-avds 1>&2 | |
exit 1 | |
fi | |
$EMULATOR -avd $1 -dns-server "8.8.8.8,8.8.4.4" |
# | |
# Call the given callback function when the indicated page is loaded | |
# | |
# [Get ready] | |
# | |
# 1. Add data attributes to the body tag in your application layout file. | |
# ex) | |
# <body data-controller="<%= controller_name %>" data-action="<%= action_name %>"> | |
# | |
# 2. Put this file into app/assets/javascripts/ |
TL;DR
Install Postgres 9.5, and then:
sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main