Skip to content

Instantly share code, notes, and snippets.

View derblub's full-sized avatar
✌️
I might be interested in cooperation.

Daniel Kurdoghlian derblub

✌️
I might be interested in cooperation.
View GitHub Profile
@derblub
derblub / primes.py
Created September 24, 2018 19:49 — forked from vegard/primes.py
Prime factorisation diagram
# -*- coding: utf-8 -*-
#
# Author: Vegard Nossum <vegard.nossum@gmail.com>
import math
import os
import sys
import cairo
@derblub
derblub / ofxconverter.ipynb
Created April 4, 2018 15:02 — forked from josephfinlayson/ofxconverter.ipynb
Convert N26 CSV to OFX
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@derblub
derblub / mysql_lib.php
Created March 29, 2018 19:24
php7 functions mysql_*
<?php
/**
* Created by PhpStorm.
* User: PHPDuck.nl
* Date: 15-03-16
* Time: 09:48
* Version: 1.0;
*
* Use this file only if u are too lazy to rebuild your PHP / Mysql script
* People, stop using mysql_ please and go to mysqli_ or PDO
@derblub
derblub / FreenasSetup.md
Created February 24, 2018 15:23 — forked from zenxedo/TrueNAS Setup.md
Ultimate FreeNAS 11.1 Setup

FreeNAS

This page was forked so be sure to check the Original for more and the links.

WARNING This page contains incomplete and possibly incorrect info. The page is constantly being edited and worked on. Many of these should work but some may be broken. Use at your own risk.

Create a "media" dataset

Create a dataset called "media" with directories for tv, movies, downloads
Give your dataset unix permissions to the default FreeNAS media user media:media
@derblub
derblub / javascript-trim-svg-whitespace.js
Created February 6, 2018 12:33 — forked from john-doherty/javascript-trim-svg-whitespace.js
Trim whitespace from SVG elements
function trimSvgWhitespace() {
// get all SVG objects in the DOM
var svgs = document.getElementsByTagName("svg");
// go through each one and add a viewbox that ensures all children are visible
for (var i=0, l=svgs.length; i<l; i++) {
var svg = svgs[i],
box = svg.getBBox(), // <- get the visual boundary required to view all children
<script >/ᅠ‌‌‌‌/[ ᅠ‌‌‌‌=""],ᅠ‌‌‌‌‌‌‌‌='"',ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌= ᅠ‌‌‌‌==ᅠ‌‌‌‌,ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌== ᅠ‌‌‌‌‌‌‌‌,ᅠ‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌+ᅠ‌‌‌‌,ᅠ‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌+
ᅠ‌‌‌‌,ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=+ᅠ‌‌‌‌,ᅠ‌=+ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌, ᅠ‌‌‌‌‌‌‌‌‌={}, ᅠ‌‌=ᅠ‌+ᅠ‌,ᅠ‌‌‌=ᅠ‌‌+ᅠ‌,ᅠ‌‌‌‌‌=ᅠ‌‌+ᅠ‌‌‌,ᅠ‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌+ᅠ‌‌‌‌‌‌‌‌‌,ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌= ᅠ‌‌‌‌‌‌‌‌‌‌‌‌.ᅠ‌‌‌‌‌‌‌+ᅠ‌‌‌‌‌‌‌‌‌,ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌[ᅠ‌] ,ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌[ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌],ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌[ᅠ‌]
,ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌[ᅠ‌‌‌‌‌],ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌[ ᅠ‌‌],ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌[ ᅠ‌],ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌[ᅠ‌‌‌],ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌[ᅠ‌‌‌],ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌[ᅠ‌] ,ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌="\\" +")(",ᅠ‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌[ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌],
ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌[ᅠ‌‌],ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌[ᅠ‌],ᅠ‌‌‌‌‌‌=ᅠ‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌‌
@derblub
derblub / gist:728f221fb9776018ebacfade6e1a0bd1
Created November 9, 2016 23:27
ip tables rules - spam block list for mail server
######## spam block list for mail server ###########################
############ blocks ###############################
@derblub
derblub / index.html
Created October 18, 2016 11:08
Sass parallax example
<div class="container">
<h1>Parallax</h1>
<h2>faster</h2>
<h2>easier</h2>
<h2>sassier</h2>
<img src="http://placekitten.com/200/200" alt=" " />
<img src="http://placekitten.com/150/200" alt=" " />
<img src="http://placekitten.com/200/150" alt=" " />
<img src="http://placekitten.com/150/250" alt=" " />
<img src="http://placekitten.com/300/400" alt=" " />
#!/usr/bin/env python
# 8 bar Audio equaliser using MCP2307
import alsaaudio as aa
import smbus
from time import sleep
from struct import unpack
import numpy as np