Skip to content

Instantly share code, notes, and snippets.

NathanGiesbrecht / noip2.service
Last active March 24, 2023 06:48
Systemd Service file for dynamic ip updater
View noip2.service
# Simple Dynamic DNS Updater
# By Nathan Giesbrecht (
# 1) Install binary as described in's source file (assuming results in /usr/local/bin)
# 2) Run sudo /usr/local/bin/noip2 -C to generate configuration file
# 3) Copy this file noip2.service to /etc/systemd/system/
# 4) Execute `sudo systemctl daemon-reload`
# 5) Execute `sudo systemctl enable noip2`
# 6) Execute `sudo systemctl start noip2`
NathanGiesbrecht / gist:6f389b150e15d27b60b6
Created December 10, 2015 15:07
My Google Analytics Referral Spam Filter - These sites are spammers
View gist:6f389b150e15d27b60b6
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import math
def accuracy_score(y_true, y_pred):
""" score = (y_true - y_pred) / len(y_true) """
ancientGlider /
Last active March 24, 2023 06:44
Authentication for Keenetic routers for work with CLI via REST API (Python)
# -*- coding: utf-8 -*-
Данные с адресом, логином, паролем хранятся в конфигурационном файле следующего вида:
ip_addr =
login = admin
passw = anyPassword
lewislepton / glsl.json
Last active March 24, 2023 06:43
GLSL snippets for visual studio code/kode studio
View glsl.json
Lewis Lepton
useful places that i grabbed info from
plus various other papers & books
karpathy /
Last active March 24, 2023 06:42
hacky stablediffusion code for generating videos
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python --prompt "blueberry spaghetti" --name blueberry
to stitch together the images, e.g.:
$ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4
mheadd /
Last active March 24, 2023 06:42
Sample API calls for creating, updating and deleting things in CKAN via the CKAN API.

Get package list

~$ curl

Get package details

~$ curl{package_id}

Upload a file to storage

~$ curl -H "Authorization: <API-KEY>"
selbekk / gist:c171c0e09b2d9e002ee5e1c30f9e2769
Last active March 24, 2023 06:42
Meghan Trainor's "All about that rebase"
View gist:c171c0e09b2d9e002ee5e1c30f9e2769
(Verse 1)
Yeah, it's pretty clear, I ain't no Git rookie
But I can merge it, merge it, like I'm supposed to do
'Cause I got that repo that all the devs chase
All the right branches and all the right bases
I see the dev team working that commit race
We know that merge ain't the only way to save face
If you got Git skills, skills
y-polek /
Last active March 24, 2023 06:41
adb commands to test Doze mode
#! /bin/zsh
# Buttery powered state
adb shell dumpsys battery | grep powered
# Unplug battery
adb shell dumpsys battery unplug
# Reset battery
adb shell dumpsys battery reset
View Add DS_Store into .gitignore for the sub

If .DS_Store was never added to your git repository, simply add it to your .gitignore file.

If you don't have one, create a file called


In your the root directory of your app and simply write