Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View leonidlezner's full-sized avatar

Leonid Lezner leonidlezner

View GitHub Profile
@leonidlezner
leonidlezner / generate.php
Created April 25, 2016 15:56
Generate multiple pages in ProcessWire
<?php
include('index.php');
$page = $pages->get('/blog');
for($i = 0; $i < 20; $i++) {
$post = new Page();
$post->template = 'blogpost';
$post->parent = $page;
@leonidlezner
leonidlezner / laravelcookbook.md
Last active May 23, 2018 22:03
Laravel Cookbook

Cookbook

Adding a virtual host for local development

Add to the httpd-vhosts.conf file:

<VirtualHost *:80>
    DocumentRoot "/Users/leonidlezner/Documents/Projects/laravelPlayground/leosnotes/public"
    ServerName leosnotes.local
@leonidlezner
leonidlezner / ufw_vpn_killswitch_tutorial.md
Created September 14, 2019 08:36 — forked from Necklaces/ufw_vpn_killswitch_tutorial.md
GNU/Linux UFW VPN kill switch tutorial

GNU/Linux UFW VPN kill switch tutorial

This is a quick guide for setting up a kill switch using UFW (Uncomplicated FireWall). It is assumed you are using OpenVPN and optionally Network-Manager with network-manager-openvpn.

1. (Optional) IP Addresses

Before we can start we're going to need the IP address (or the IP addresses) of your VPN so that we can whitelist those later on, write them down. They are obviously going to be different for every VPN and VPNs with multiple servers, so I'll leave this up to you.

2. Install & Enable UFW

On some systems UFW is installed and enabled by default (Ubuntu, for example). Installation procedure is going to be different for every distribution of GNU/Linux, but once you've got it installed enabling it is easy (assuming you have sudo):

#!/bin/bash
# Usage: ./rodecaster_conv.sh POD000131.WAV
# Tool sox is needed!
# Installation..
# ..under Debian/Ubuntu: sudo apt-get install sox
# ..under maxOS using Homebrew: brew install sox
function convert() {

Katas

Als Katas werden kleine abgeschlossene Lerneinheiten bezeichnet, in denen die Praxis und häufige Wiederholung bedeutend für das Lernen sind. Der Name Kata rührt aus den japanischen Kampfkünsten und wurde auf Programmierübungen übertragen.

Übersicht der Katas

Es gibt 11 Katas, die in 12 Wochen abgeschlossen werden. Zusätzlich gibt es eine Woche 0 (und Kata 0), die nicht auf das eigentliche Ziel des Lernpfades einzahlt.

Struktur der Katas

Jede Kata ist nach einer ähnlichen Struktur aufgebaut. Zeitlich gesehen besteht jedes Treffen aus folgenden Abschnitten:

@leonidlezner
leonidlezner / _phlow.yml
Created January 4, 2020 10:45 — forked from Phlow/_phlow.yml
Three templates for asciidoctor-pdf #asciidoctor #style #template
font:
catalog:
# Noto Serif supports Latin, Latin-1 Supplement, Latin Extended-A, Greek, Cyrillic, Vietnamese & an assortment of symbols
Open Sans:
normal: OpenSans-Regular.ttf
bold: OpenSans-Bold.ttf
italic: OpenSans-Italic.ttf
bold_italic: OpenSans-BoldItalic.ttf
Open Sans Condensed:
normal: OpenSansCondensed-Light.ttf
#!/bin/bash
basename=$1
cover=$2
if [ -z $basename ]; then
echo "Input file not set!"
exit 1
fi