Skip to content

Instantly share code, notes, and snippets.

Avatar

Andraz Brodnik brodul

View GitHub Profile
@brodul
brodul / basic_wrapping.py
Last active Jan 4, 2020
concurrency in python in 2020
View basic_wrapping.py
import urllib.request
import asyncio
loop = asyncio.get_event_loop()
loop.set_debug(True)
def get(url):
with urllib.request.urlopen(url) as f:
return f.read()
View traefik.log
time="2018-01-16T21:16:01Z" level=error msg="Error getting ACME certificates [last-push.example.com] : cannot obtain certificates map[last-push.example.com:acme: Error 429 - urn:acme:error:rateLimited - Error creating new authz :: too many fa
iled authorizations recently: see https://letsencrypt.org/docs/rate-limits/]"
time="2018-01-17T09:25:04Z" level=error msg="map[develop.1.example.com:acme: Error 403 - urn:acme:error:unauthorized - Invalid response from http://develop.1.example.com/.well-known/acme-challenge/8TGpwog-LKOdXLRFxcKVBVLqv1MJlJd1r34aY7WeDXM:
"
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Page not"
View traefik.toml
graceTimeOut = "10s"
checkNewVersion = false
defaultEntryPoints = ["http", "https"]
[entryPoints]
[entryPoints.http]
address = ":80"
[entryPoints.http.redirect]
entryPoint = "https"
[entryPoints.https]
address = ":443"
View gist:d3c4a9c20ba7dd6dfff8b8c7ef00b1a5
time="2018-01-16T15:36:16Z" level=error msg="map[last-push.example.com:acme: Error 429 - urn:acme:error:rateLimited - Error creating new authz :: too many failed authorizations recently: see https://letsencrypt.org/docs/rate-limits/]"
time="2018-01-16T15:36:16Z" level=error msg="Error getting ACME certificates [last-push.example.com] : cannot obtain certificates map[last-push.example.com:acme: Error 429 - urn:acme:error:rateLimited - Error creating new authz :: too many failed authorizations recently: see https://letsencrypt.org/docs/rate-limits/]"
time="2018-01-16T15:36:20Z" level=error msg="map[last-push.1.example.com:acme: Error 403 - urn:acme:error:unauthorized - Invalid response from http://last-push.1.example.com/.well-known/acme-challenge/-NdWyrjogM19ohD5-2GAgiVQjwDuGl2Jk5ZJ8i3cpi0: "
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Page not"
Error Detail:
Validation for last-push.1.example.com:443
View espeak.txt
brodul:~/ $ espeak [11:17:59]
a
ALSA lib pcm.c:2521:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2521:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2521:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm_route.c:867:(find_matching_chmap) Found no matching channel map
ALSA lib pcm.c:2442:(snd_pcm_open_conf) Either /nix/store/bmqqdmp9jajmx8v5jwc4lxl62b6apynm-alsa-plugins-1.1.5/lib/alsa-lib/libasound_module_pcm_pulse.so cannot be opened or _snd_pcm_pulse_open was not defined inside
View nom.sh
#!/usr/bin/env bash
build ()
{
echo "in build"
frontend ()
{
echo "in frontend"
echo "$@"
}
View nom.py
import os
import serial
commands = {
'ON_C': b'0',
'DOWN_VOLUME_C': b'1',
'UP_VOLUME_C': b'2',
'MUTE_C': b'3',
'DVD_C': b'4',
View reci_hackaton.md

Hi hackers,

on the hackaton I and you will be working on the futr app.

https://github.com/brodul/futr

http://futr.herokuapp.com/

YOu will be able to intantly work on it. Its deployed on heroku an the app is preaty messy. But to have a deliverable at the end of the day we will do the following.

View out.txt
[nix-shell:~]$ nix-env -q --attr-path \* | head
64 atftp-0.7.1
97 atom-1.16.0
54 audacity-2.1.2
31 awscli-1.11.75
72 bazel-20150326.981b7bc1
85 beep-1.3
73 bind-9.10.4-P5
View shell.nix
let
pkgs = import <nixpkgs> {};
buildDeps = with pkgs; [stdenv buildGoPackage fetchgit fetchhg fetchbzr fetchsvn];
goFish = import ./default.nix;
in pkgs.stdenv.mkDerivation {
name = "go-fish-nix-shell";
buildInputs = [ (goFish {inherit buildDeps; }) ];
}
You can’t perform that action at this time.