Skip to content

Instantly share code, notes, and snippets.

View elzekool's full-sized avatar

Elze Kool elzekool

  • The Netherlands / Drenthe
View GitHub Profile
import * as fs from "fs";
import {Shape} from "@laser-dac/draw/dist/Shape";
import {Color, Point} from "@laser-dac/draw/dist/Point";
import {Path} from "@laser-dac/draw";
interface HersheyCharacter {
leftPos : number,
rightPos : number,
vertexCount : number,
vertices : string[]
import sqlite3
import os
import clamd
import shutil
import time
from subprocess import check_output
# Set to the path that should be scanned (absolute path, ie: /home/luna/docker)
pathToScan = '/home/elzekool/Downloads'
sudo apt-get update -y
sudo apt-get install build-essential tk-dev libncurses5-dev libncursesw5-dev libreadline6-dev libdb5.3-dev libgdbm-dev libsqlite3-dev libssl-dev libbz2-dev libexpat1-dev liblzma-dev zlib1g-dev libffi-dev -y
wget https://www.python.org/ftp/python/3.7.1/Python-3.7.1.tgz
tar xf Python-3.7.1.tgz
cd Python-3.7.1
./configure
make
sudo make altinstall
cd ..
sudo rm -rf Python-3.7.1
<?php
/**
* Copyright © 2013-2017 Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\Config\App\Config\Type;
use Magento\Framework\App\Config\ConfigTypeInterface;
use Magento\Framework\App\Config\ConfigSourceInterface;
use Magento\Framework\App\Config\Spi\PostProcessorInterface;
@elzekool
elzekool / composer.lock
Created March 16, 2017 21:32
composer.lock with packages that have vulnerabilities (For testing purposes)
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "3f7f572cc33cd97a5c6f31e6076f0c2d",
"packages": [
{
"name": "behat/transliterator",
@elzekool
elzekool / hypriot_os.sh
Last active September 18, 2023 10:09
My Hypriot OS Configuration
# Install basic tools (git/vim/i2c-tools)
sudo apt-get update
sudo apt-get install -y \
git \
vim \
i2c-tools \
avahi-utils
# Enable I2C
# See https://learn.adafruit.com/adafruits-raspberry-pi-lesson-4-gpio-setup/configuring-i2c#installing-kernel-support-manually
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDPKvZ1/PSyh9omJl6kD0vmShMURTh8NrGGw9/7iF3iz35WAhbfthvqZ5jMu8HNuVr0tnEP80BQHYSqktqnJhVMpaKyusseFM+RytId/d7i0MpxeJDYmJyTaoKUyQ7FMT6JpbrHfClg4s9FyKwZFrAww4dWPEjeKYywYX40ceZ6zZ5UIpKklWhtdZqNYNCbAzb+ThpQeJkydpnoN7QpwnKQ1MLcEXZsA+EtAvscVGH0ZjKEvoeCpTNUfnFq0HGZ8kyE3rlE+aV4AjzePB9899dYHWcdLpm+QabejtIeP2GTDwT4euegVeanX/zE24f33rlm+cSeZyOWrrTBRuM2G7Cf e.kool@youwe.nl
@elzekool
elzekool / vim_setup.sh
Last active November 27, 2016 13:14
My VIM setup
#!/bin/bash
sudo rm -fR ~/.vim
sudo apt-get update
sudo apt-get -y install vim-nox vim-fugitive vim-pathogen git build-essential
git clone https://github.com/vim-airline/vim-airline ~/.vim/bundle/vim-airline
git clone https://github.com/scrooloose/nerdtree.git ~/.vim/bundle/nerdtree
git clone https://github.com/Shougo/vimproc.vim.git ~/.vim/bundle/vimproc.vim
cd ~/.vim/bundle/vimproc.vim
@elzekool
elzekool / public_key
Created January 6, 2016 20:22
elzekool@kooldevelopment.nl Public key
ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAh2uhW6PLqY5tvIlBaIm2ru+iqQlDUqibUBjqEKclOxSY41gQTj9RZe4NpEO+81efzXNr81V/koc2/35tRRnVmI1zopt1kgT3NK3VSCGx/NAgi+IYCFYGneR/l/jUQpTkBT0aLLIHYiic2xzMWst2hcbx31WymRBcPm0qMPSNMod3C59kzXrC68IEb7Cx4i4MDlJc5sjoRFikOFgAWc3aCUZP0gFMR3rc54zIBJwASWGLqRLzn7pja95ga+bzReC+3O9TVWh31wLu0OI8VF3sBvPvXcJMQO1dASyTgIGrAFp0lg0CbxPI2v1n4cyVFoZ2Llb11t2Ixeg2fudFOqAhjQ== elzekool@kooldevelopment.nl
@elzekool
elzekool / commercialize.php
Last active August 29, 2015 14:13
Make an commercial price of original price with margin
<?php
/**
* Make nice commercial price from orignal price
*
* @param string $price Original price
* @param string $rangeDown Range down in percent
* @param string $rangeUp Range up in percent
* @param string $minUnit Minimal unit to increment up/down
*