This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sublimetext ebook merge paragraphs regexp pattern | |
search pattern: | |
(\n\n)([\w]) | |
replace pattern: | |
\2 | |
before: | |
„Elfové a draci, řek jsem svýmu klukovi, zelí a brambory jsou pro nás |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
class Test { | |
public static void main(String[] args) { | |
try { | |
System.out.println("Hello World!"); | |
int maxKeyLen = Cipher.getMaxAllowedKeyLength("AES"); | |
System.out.println(maxKeyLen); | |
} catch (Exception e){ | |
System.out.println("Sad world :("); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http { | |
#access_log logs/access.log main; | |
# parse \d{4}-\d{2} from $time_iso8601 into $yyyy_mm | |
map $time_iso8601 $yyyy_mm { | |
"~^(?<temp>\d{4}-\d{2})" $temp; | |
} | |
server { | |
listen 80; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# The hook supports 2 actions, 'create' and 'delete', passed as the first argument. | |
# When 'create' is passed in, a validation TXT record is added, | |
# 'delete' cleans up that record after validation | |
ACTION=$1 | |
# The second the name of the Azure Account that contains the DNS Zone Resource | |
AZ_ACCOUNT=$2 | |
echo $AZ_ACCOUNT | |
# set the name of the Azure Resource Group that contains the DNS Zone Resource |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// radio code generator for ford radio with serial starting with "M" | |
// stolen from https://github.com/OlegSmelov/ford-radio-codes | |
// get the radio serial by holding 1+6 while powering radio on | |
'use strict'; | |
function generateSerial(serial) { | |
const lookup = [ | |
[9, 5, 3, 4, 8, 7, 2, 6, 1, 0], | |
[2, 1, 5, 6, 9, 3, 7, 0, 4, 8], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash | |
dir=$(mktemp --directory) | |
declare -a input=() | |
cat <<__EOT__ > ${dir}/metadata.txt | |
--- | |
title: The Story of Us | |
author: Tim Urban | |
rights: Creative Commons Non-Commercial Share Alike 3.0 |
OlderNewer