Skip to content

Instantly share code, notes, and snippets.

@BastiTee
BastiTee / poc-paywall-gabonn.py
Last active October 26, 2023 18:54
Proof of concept: Paywall used on gabonn.de
# -*- coding: utf-8 -*-
"""Proof-of-concept.
This scripts tries to document the drawbacks of the paywall used on General-Anzeiger Bonn.
http://gabonn.de/
As with many other paywalls the content behind the paywall is still present – in this
case with letter-randomized "blurred" words. The raw data itself can easily be obtained
with any HTML parser like BeautifulSoup.
@harshavardhana
harshavardhana / nginx-minio-static.md
Last active April 19, 2024 09:33 — forked from koolhead17/gist:4b8dd8d95ec86368634693cf9ad9391c
How to configure static website using Nginx with MinIO ?

How to configure static website using Nginx with MinIO ?

1. Install nginx

2. Install minio

3. Install mc client

4. Create a bucket:

$ mc mb myminio/static
Bucket created successfully ‘myminio/static’.
@Luzifer
Luzifer / vault-gpg.sh
Created April 8, 2016 12:59
vault-gpg script to unlock GPG keys using Vault stored passwords #blog
#!/bin/bash
KEY=$1
if [ -z "${KEY}" ] || ! (gpg --list-secret-keys | grep -q ${KEY}); then
echo "No key given or no secret key found for '${KEY}'"
exit 2
fi
# Read password for this key
@bellbind
bellbind / loader.html
Last active May 4, 2024 04:42
[threejs][html5]STL File Viewer with HTML5 File API
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title>STL File Viewer</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r68/three.min.js"
></script>
<script src="https://rawgit.com/mrdoob/three.js/master/examples/js/controls/TrackballControls.js"
></script>
<script src="loader.js"></script>
@Ribesg
Ribesg / bash_aliases.sh
Last active December 31, 2015 12:09
Here's my server's Starbound related config files and scripts.
alias sb_start="sudo start starbound"
alias sb_stop="sudo stop starbound"
alias sb_restart="sb_stop;sb_start"
alias sb_update="sudo /home/ribesg/sb_update"
alias sb_online="netstat -nt | grep -c 21025"
alias sb_status="sudo status starbound"
anonymous
anonymous / gs_sp_to_txt.sh
Created June 30, 2012 13:16
Google Speech to Text script
arecord -D plughw:1,0 -f cd -t wav -d 3 -r 16000 | flac - -f --best --sample-rate 16000 -o out.flac; wget -O - -o /dev/null --post-file out.flac --header="Content-Type: audio/x-flac; rate=16000" http://www.google.com/speech-api/v1/recognize?lang=en | sed -e 's/[{}]/''/g'| awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]; exit }' | awk -F: 'NR==3 { print $3; exit }'
@GothAck
GothAck / index.js
Created March 20, 2012 18:33
Parsing BIG compressed XML data (OpenStreetMap) with Node.js
#!/usr/bin/env node
/*
* Parsing BIG compressed data with Node.js and SAX
* Probably some bugs, but worked fine for OpenStreetMap Great Britain bz2
* Greg Miell 2012
*/
// Simple string trim prototype extension
String.prototype.trim = function() {
@jerico
jerico / photobooth.sh
Created December 21, 2011 17:01
Very rough photobooth script using gPhoto2, ImageMagick, and CUPS.
#! /usr/bin/env bash
# Extremely rough photobooth bash script
# It depends on the following:
# - gPhoto2: for camera control through usb
# - ImageMagick: photo-manipulation suite
# - CUPS: printer driver with command-line printing utilities
# - beep: for the countdown sound
save_dir=./processed