Skip to content

Instantly share code, notes, and snippets.

import pandas as pd
import requests
import json
from datetime import date
import random
import time
from influxdb_client import InfluxDBClient, Point, WriteOptions
from influxdb_client.client.write_api import SYNCHRONOUS
IFURL=""
@straend
straend / gist:4fa9071cffa18152862998be7cc599f0
Created November 3, 2021 19:24
Clean comment author from pdfs
cleaned_pdf() { pdftk $1 output - uncompress | sed "/^\/T (/d" | pdftk - output cleaned/$1 compress ;} ; export -f cleaned_pdf;
find *.pdf -exec bash -c 'cleaned_pdf "$0"' {} \;
@straend
straend / flows.json
Last active July 6, 2021 09:22
FMI Forecast to influxdb with node-red
[
{
"id": "71f8148d.67c3b4",
"type": "tab",
"label": "FMI forecast",
"disabled": false,
"info": ""
},
{
"id": "9c2fc82b.348dc8",
@straend
straend / acme-cert-dump.py
Last active September 26, 2019 18:20 — forked from emorydunn/acme-cert-dump.py
Dump certificates from Traefik's acme.json
#!/usr/bin/env python3
import argparse
import base64
import json
import os
import shlex
import subprocess
import sys
@straend
straend / keybase.md
Last active November 28, 2016 11:50

Keybase proof

I hereby claim:

  • I am straend on github.
  • I am straendt (https://keybase.io/straendt) on keybase.
  • I have a public key ASB-gE_U4-fSKh-cFZyaUy1lkfykg32fmIi5bLwmjJrzlAo

To claim this, I am signing this object:

2015-07-07 11:44:03 +0300
cmake
.
-DENABLE_DECODE=y
-DCMAKE_C_FLAGS_RELEASE=
-DCMAKE_CXX_FLAGS_RELEASE=
-DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/pulseview/HEAD
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_FIND_FRAMEWORK=LAST
@straend
straend / GoSMS.py
Last active December 16, 2015 10:58
IF you have a Gomobile subsciption, you could use this script to send free sms's with
#!/usr/bin/venv python2
'''
Utility to send Free text messages if You have a registered GoMobile subscription
Get your subscription from here: http://www.go.fi/
Register here: https://oma.go.fi/UserRegistration
And use like this,
python GoSms.py "Recievers phonenumber" "Message" --phone "your phonenumber" --pass "password"
or set userpass and userphone in this file
@straend
straend / ElisaviihdeDownloadList.user.js
Created April 24, 2012 21:17
Userscript for Greasemonkey/Chrome to list direct download/watch link for your recordnings in Elisa Viihde
// ==UserScript==
// @author slo
// @name ElisaViihde Recordings
// @namespace net.fik1.fulkod.elisaviihde.list
// @include http://elisaviihde.fi/etvrecorder/*
// ==/UserScript==
function listAll(){
var rows = document.getElementById("rec_table").getElementsByClassName("programview");