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
#! /usr/bin/php | |
<?php | |
class AndroidApp { | |
#0: Trees for Cars by Leo Grand | |
#1: 0,99 $ | |
#2: December 11, 2013 | |
#3: Complete | |
#4: Android Apps | |
#5: Transportation |
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
function filterByHeader(search, hdr_regex, labelname) { | |
var label = GmailApp.getUserLabelByName(labelname); | |
var cnt = 0; | |
var threads = GmailApp.search(search); | |
for (var j=0; j<threads.length; j++) { | |
thd = threads[j]; | |
msgs = thd.getMessages(); | |
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
#! /usr/local/bin/perl -- | |
# | |
# [kris:~] $ ./test.pl | |
# f1 start | |
# f2 start | |
# f3 start | |
# Exiting eval via next at ./test.pl line 26. | |
# Exiting subroutine via next at ./test.pl line 26. | |
# Exiting subroutine via next at ./test.pl line 26. | |
# f1 end |
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 | |
# | |
# Do initial configuration of a SP111 plug on your local wifi | |
# | |
# Licensed under the GPLv3+ | |
# | |
TEMPLATE='{"NAME":"SP111 v1.1","GPIO":[56,0,158,0,132,134,0,0,131,17,0,21,0],"FLAG":0,"BASE":45}' | |
function uriencode { |
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
mysql> show create table c\G | |
*************************** 1. row *************************** | |
Table: c | |
Create Table: CREATE TABLE `c` ( | |
`id` bigint unsigned NOT NULL AUTO_INCREMENT, | |
`parent` bigint unsigned DEFAULT NULL, | |
UNIQUE KEY `id` (`id`), | |
KEY `parent` (`parent`), | |
CONSTRAINT `c_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `c` (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 |
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
CREATE TABLE `c` ( | |
`id` bigint unsigned NOT NULL AUTO_INCREMENT, | |
`parent` bigint unsigned DEFAULT NULL, | |
UNIQUE KEY `id` (`id`), | |
KEY `parent` (`parent`), | |
CONSTRAINT `c_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `c` (`id`) | |
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 | |
INSERT INTO `c` VALUES (1,NULL),(2,1),(3,1),(4,2),(5,2),(6,3),(7,3),(8,3); |
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
Rendering blog.koehntopp.info now takes 400s in Jekyll. That's too slow. | |
I can import the entire thing into hugo with `hugo import jekyll ~/Source/isotopp.github.io isotopp` | |
and get a hugo version of all. | |
That leaves me with the work to port Type-on-Strap to Hugo. But I do not | |
even understand how Hugo applies Templates and it is hard to debug. | |
kris@server:~/hugo/isotopp$ ~/Source/hugo/hugo version | |
Hugo Static Site Generator v0.79.0-DEV/extended linux/amd64 BuildDate: unknown |
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
#! /usr/bin/python3 | |
import json | |
import pprint | |
count=0 | |
with open("data.jsonl", "r") as f: | |
while (line := f.readline()) and count<3: | |
d = json.loads(line) | |
pprint.pprint(d) |
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
--- the table.the_field contains mojibake | |
update the_table | |
set the_field = | |
case | |
-- conversion may fail, returning NULL. In this case, retain original data | |
when convert(cast(convert(the_field using latin1) as binary) using utf8mb4) is null then the_field | |
-- conversion success -> choose the demojibaked data | |
else convert(cast(convert(the_field using latin1) as binary) using utf8mb4) | |
end | |
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
#! /usr/bin/env python3 | |
from contextlib import contextmanager | |
class Keks: | |
def __init__(self): | |
self.a = 42 | |
self.b = "Hallo Welt" | |
keks = Keks() |
OlderNewer