Skip to content

Instantly share code, notes, and snippets.

@doniks
doniks / covidmap.R
Created October 24, 2020 19:50 — forked from mschnetzer/covidmap.R
Entwicklung der Covid-Pandemie in Österreichs Bezirken (https://twitter.com/matschnetzer/status/1319904508386942976)
library(tidyverse)
library(sf)
library(gganimate)
library(transformr)
library(lubridate)
library(msthemes) # https://github.com/mschnetzer/msthemes
# Import online map
bezirke <- st_read("https://raw.githubusercontent.com/ginseng666/GeoJSON-TopoJSON-Austria/master/2017/simplified-99.9/bezirke_999_geo.json") %>%
mutate(iso = as.numeric(iso))
#!/bin/bash
arecord -f cd -t wav -r 16000 -d 5 | flac -f - -o sample.flac
wget -q -U "Mozilla/5.0" --post-file sample.flac --header="Content-Type: audio/x-flac; rate=16000" -O - \
"http://www.google.com/speech-api/v1/recognize?lang=en-us&client=chromium"
@doniks
doniks / oxide.qml
Created June 9, 2018 08:46 — forked from penk/oxide.qml
Example of Using Oxide with User Script
import QtQuick 2.0
import com.canonical.Oxide 0.1
WebView {
width: 800
height: 600
url: 'http://google.com'
context: WebContext {
userAgent: "Mozilla/5.0 (Ubuntu; Tablet) WebKit/537.21"
@doniks
doniks / unityscreenshot
Created June 9, 2018 08:45 — forked from penk/unityscreenshot
Take screenshot from Ubuntu Touch
#!/bin/sh
set -e
D=$(date +"%Y%m%d%H%M%S")
size=$(adb shell "fbset|sed -n -e's/^mode.*\"\([0-9]\+x[0-9]\+\)[-\"].*$/\1/p'")
adb shell mirscreencast -m /var/run/mir_socket -n 1 -f /tmp/${D}.rgba
adb pull /tmp/${D}.rgba
/opt/ImageMagick/bin/convert -depth 8 -size $size ${D}.rgba ~/Desktop/${D}.png
/bin/rm ${D}.rgba
#qlmanage -p ~/Desktop/${D}.png >& /dev/null &