Skip to content

Instantly share code, notes, and snippets.

View macbre's full-sized avatar
🏠
Working from home

Maciej Brencz macbre

🏠
Working from home
View GitHub Profile
@macbre
macbre / export_to_pdf.sh
Last active December 16, 2020 19:38
calendar
#!/bin/bash
export TMPDIR="${HOME}/.tmp"
mkdir -p $TMPDIR
FILES=$(ls *.svg | egrep '[0-9]\.')
DPI=400
# inkscape --file=12.svg --export-text-to-path --export-dpi=300 --export-pdf-version=1.5 --export-filename=pdf/12.pdf
for file in $FILES
do
@macbre
macbre / 2019-https-localhost.md
Created April 4, 2020 09:54 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@macbre
macbre / nginx-tls.conf
Created April 1, 2020 17:20 — forked from gavinhungry/nginx-tls.conf
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are omitted here.
#
# Example: https://www.ssllabs.com/ssltest/analyze.html?d=gavinhungry.io
#
@macbre
macbre / .gitignore
Last active August 19, 2020 17:30
mbc-harvester
.idea/
*.swp
env
user-password.py
apicache-py3/
harvest.log
pywikibot.lwp
throttle.ctrl
@macbre
macbre / ntriples.py
Created August 24, 2019 09:45
N-Triples parser
#!/usr/bin/env python
"""
N-Triples Parser
Copyright 2004, Sean B. Palmer, inamidst.com
Licensed under GPL 2, W3C, BSD, MIT, or EFL 2
Documentation:
http://inamidst.com/proj/rdf/ntriples-doc
Command line usage:
./ntriples.py <URI> - parses URI as N-Triples
@macbre
macbre / waterfalls.txt
Created July 30, 2019 22:11
Faroe Islands
$ curl -s 'https://gis.us.fo/arcgis/rest/services/stadarnovn/us_stadarnovn/MapServer/1/query?f=json&where=UPPER(name)%20LIKE%20%27%25FOSSUR%25%27&returnGeometry=false&spatialRel=esriSpatialRelIntersects&outFields=name%2Cobjectid&outSR=5316&resultRecordCount=200' | jq .features[].attributes.name -r | sort
Áarstíggjafossur
Ærgifossur
Ærgisfossur
Ærgisfossur
Bjerndalsfossur
Bláfossur
Bláfossur
Bláfossur
Bláfossur
@macbre
macbre / fetch-youtube.sh
Created June 14, 2019 17:57
Fetch audio from YouTube video
#!/bin/bash
youtube-dl --extract-audio --audio-format mp3 -o "%(title)s.%(ext)s" "$1"
Jan Nalaskowski 2008-12-11 23:33:51
=========================================
http://web.archive.org/web/20120310203608/http://www.stosunkimiedzynarodowe.info/artykul,283,Kwestia_niepodleglosci_Wysp_Owczych
Niedawne referendum przeprowadzone w Grenlandii ożywiło debatę na temat kwestii niepodległości Wysp Owczych. Sprawa ta powraca cyklicznie co pewien czas, jednak jej realność jest często podważana.
Na archipelag składa się 18 wysp, z czego 17 jest zamieszkałych. Strategiczne położenie na północnowschodnim Atlantyku czyni z Wysp Owczych potencjalnie cennego sojusznika, ale i ważnego gracza w swoim regionie oraz w rejonie arktycznym.
Prawdopodobnie już w VII i VIII wieku Wyspy służyły jako miejsce odosobnienia dla irlandzkich mnichów szukających samotności. Jednak coraz bardziej aktywni w tych rejonach Wikingowie doprowadzili do ustabilizowania się około IX wieku norweskiego osadnictwa. Wyspy Owcze włączone zostały do Królestwa Norwegii w roku 1035. Podobnie jak w przypadku Grenlandii, ziemie te uległy ro
@macbre
macbre / README.md
Last active April 20, 2019 19:57
vita

This gist contains dumps of knowledge / facts indexed by vita - a wiki-powered knowledge graph.