Skip to content

Instantly share code, notes, and snippets.

@NathanGiesbrecht
NathanGiesbrecht / noip2.service
Last active March 24, 2023 06:48
Systemd Service file for no-ip.com dynamic ip updater
View noip2.service
# Simple No-ip.com Dynamic DNS Updater
#
# By Nathan Giesbrecht (http://nathangiesbrecht.com)
#
# 1) Install binary as described in no-ip.com'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
NathanGiesbrecht / gist:6f389b150e15d27b60b6
Created December 10, 2015 15:07
My Google Analytics Referral Spam Filter - These sites are spammers
View gist:6f389b150e15d27b60b6
forex-ninjas\.com|4webmasters\.org|trafficmonetize\.org|webmonetizer\.net|trafficmonetizer\.org|traffic2money\.com|seo-platform\.com|best-seo-software\.xyz|traffic2cash\.net|ranksonic\.net|traffic2cash\.org|boost-my-site\.com
View NaiveBayesClassifier.py
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
ancientGlider / keenetic_auth.py
Last active March 24, 2023 06:44
Authentication for Keenetic routers for work with CLI via REST API (Python)
View keenetic_auth.py
# -*- coding: utf-8 -*-
"""
Данные с адресом, логином, паролем хранятся в конфигурационном файле следующего вида:
[Router]
ip_addr = 192.168.1.1:8080
login = admin
passw = anyPassword
@lewislepton
lewislepton / glsl.json
Last active March 24, 2023 06:43
GLSL snippets for visual studio code/kode studio
View glsl.json
/*
AUTO-COMPLETE SNIPPETS FOR GLSL WITHIN VISUAL CODE STUDIO
Lewis Lepton
https://lewislepton.com
useful places that i grabbed info from
http://www.shaderific.com/glsl
https://www.khronos.org/opengl/wiki/OpenGL_Shading_Language
plus various other papers & books
*/
@karpathy
karpathy / stablediffusionwalk.py
Last active March 24, 2023 06:42
hacky stablediffusion code for generating videos
View stablediffusionwalk.py
"""
stable diffusion dreaming
creates hypnotic moving videos by smoothly walking randomly through the sample space
example way to run this script:
$ python stablediffusionwalk.py --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
mheadd / dataset-management.md
Last active March 24, 2023 06:42
Sample API calls for creating, updating and deleting things in CKAN via the CKAN API.
View dataset-management.md

Get package list

~$ curl http://www.civicdata.com/api/action/package_list

Get package details

~$ curl http://www.civicdata.com/api/action/package_show?id={package_id}

Upload a file to storage

~$ curl http://www.civicdata.com/api/storage/auth/form/testdata/test.csv -H "Authorization: <API-KEY>"
@selbekk
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
(Pre-Chorus)
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
y-polek / doze_mode_adb_commands.sh
Last active March 24, 2023 06:41
adb commands to test Doze mode
View doze_mode_adb_commands.sh
#! /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 directory.md

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

.gitignore

In your the root directory of your app and simply write