Skip to content

Instantly share code, notes, and snippets.


Janek Lasocki-Biczysko janeklb

View GitHub Profile
janeklb / nmcli_vpn.bash
Created Aug 21, 2021
Importin openvpn connections into network manager on (x)ubuntu
View nmcli_vpn.bash
# install openvpn network manager
# `network-manager-openvpn-gnome` is required for password management + interation with keyring
sudo apt install network-manager network-manager-openvpn network-manager-openvpn-gnome
# import .ovpn file into network manager
nmcli connection import type openvpn file <PATH-TO-OVPN-FILE>
# set username
nmcli connection modify openvpn-connection username=<USERNAME>
# set password
nmcli connection modify openvpn-connection +vpn.secrets password=<PASSWORD>
janeklb / .bash_profile
Created Aug 3, 2017 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
# Description: This file holds all my BASH configurations and aliases
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
janeklb /
Created Jul 27, 2016
install unoconv 0.7 on debian jessie
# Add unstable repo to sources.list
# meaning, add the following lines (and uncomment) to /etc/apt/sources.list:
# deb unstable main non-free contrib
# deb-src unstable main non-free contrib
gpg --export --armor 8514CC63 | apt-key add - && apt update # might not be needed
apt-get build-dep unoconv
cd /usr/src
janeklb /
Last active Dec 28, 2015
Attempting to programatically write a Wro4j resource group to a file
package com.intrallect.amauthor.wro4j;
import javax.annotation.PostConstruct;
import javax.servlet.FilterConfig;
janeklb /
Last active Dec 24, 2015
Easy peezy deploy from a git repo using rsync
# heavily inspired by (and comments)
ref=master # git ref
prefix=deploy_in_prog/ # just a temp name
remote_dir=/var/www # the remote directory
remote_host=user@host # the remote host
janeklb / gist:5546011
Last active Dec 17, 2015
AngularJS '&' directive scope - 2
View gist:5546011
<div ng-app="myApp" ng-controller="myController">
<div my-clicky my-click-action="doStuff(number)"></div>
janeklb / gist:5544464
Last active Dec 17, 2015
AngularJS '&' directive scope - 1
View gist:5544464
<div ng-app="myApp" ng-controller="myController">
<div my-clicky my-click-action="doStuff()"></div>
janeklb / gist:4761535
Last active Sep 4, 2020
PHP: array to object
View gist:4761535
# Simple loop copy
function loop_copy($array) {
$object = new stdClass();
foreach ($array as $key => $value) {
$object->$key = $value;
janeklb / gist:4650320
Created Jan 27, 2013
create javascript date objects using date strings, in the user's timezone
View gist:4650320
function dateInLocalTimezone(simpleDateString) {
var date = new Date(simpleDateString), millis = date.getTime();
date.setTime(millis + date.getTimezoneOffset() * 60 * 1000);
return date;
janeklb / gist:2761327
Created May 21, 2012
Bootstrap (v2.0.3) tooltip issue
View gist:2761327
<!DOCTYPE html>
<link rel="stylesheet" type="text/css" href="" />
<link rel="stylesheet" type="text/css" href="" />
<body style="padding: 60px 0;">
<div style="float:right;">
<a class="btn tt" title="Yaaaaaaaaaaay, this longer tooltip works.. kinda">:)</a>
<a class="btn tt" title="Boooooooooooo, this longer tooltip is broken..">:(</a>