Skip to content

Instantly share code, notes, and snippets.

View penguwin's full-sized avatar
:shipit:
bingo bango bongo bish bash bosh 👩‍💻

Nicolas M. penguwin

:shipit:
bingo bango bongo bish bash bosh 👩‍💻
View GitHub Profile
@marco79cgn
marco79cgn / dm-toilet-paper.js
Last active February 29, 2024 17:35
iOS Widget, das die Anzahl an Klopapier Packungen in deiner nächsten dm Drogerie anzeigt (für die scriptable.app)
// dm Klopapier Widget
//
// Copyright (C) 2020 by marco79 <marco79cgn@gmail.com>
//
// Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted.
//
// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
// INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
// IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
#!/usr/bin/bash
#
# This script transcodes the input video into x265 30fps
#
INPUT=$1
SEC=$2
[[ -f "$INPUT" ]] || (echo "No input file specified" && exit 1)
[ -z "$SEC" ] && OUTPUT="${INPUT%.*}.mp4" || OUTPUT="$SEC"
@yogthos
yogthos / clojure-beginner.md
Last active May 6, 2024 08:11
Clojure beginner resources

Introductory resources

Store files in folder structure, following my org tree structure

I usually have a huge numbers of files, related to my projects. I would like to use attach to associate the files with the proper entry, but searching them later in my Dropbox is a pain because of the way Org saves the attachments. It makes more sense for me to make attachments follow the org tree structure in the project by default (unless I change the attach folder to something else).

This can be done if we make attachment by creating a symbolic link to the attach folder in the place, according to the headline path. This way allows to keep all the file attached to the project accessible with relative paths.

import requests
import json
from bs4 import BeautifulSoup
BASE_URL = "https://coinmarketcap.com/currencies/{currency}/historical-data/"
def main():
url = BASE_URL.format(currency="bitcoin")
payload = {
@alphapapa
alphapapa / fitness.org
Last active April 6, 2024 04:33
An Emacs food/weight/workout tracker self-contained in a single Org file

Plots

/home/me/org/double-plot.png

Tasks

@fawkesley
fawkesley / randomize-mac-addresses.sh
Last active July 25, 2022 06:24
In Ubuntu 16.04, randomize WiFi MAC addresses with a daily rotation - /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
#!/bin/sh
# /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# INSTALL
#
# > curl -L 'https://gist.github.com/paulfurley/46e0547ce5c5ea7eabeaef50dbacef3f/raw/56ee5dd5f40dec93b8f7438cbdeda5475ea3b5d2/randomize-mac-addresses.sh' |sudo tee /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# > sudo chmod +x /etc/NetworkManager/dispatcher.d/pre-up.d/randomize-mac-addresses.sh
# Configure every saved WiFi connection in NetworkManager with a spoofed MAC
@mwfogleman
mwfogleman / weeklyreviewtemplate.org
Last active December 14, 2023 19:50
Weekly Review Template

Weekly Review

Get Clear [0/5]

  • [ ] Collect Loose Papers and Materials
  • [ ] Get “IN” to Zero
    • [ ] Papers
    • [ ] Physical Notebook
    • [ ] Physical Objects
    • [ ] Text Messages
    • [ ] Voice Mail
    • [ ] Email Inboxes