Skip to content

Instantly share code, notes, and snippets.

View koenverburg's full-sized avatar
:octocat:

Koen Verburg koenverburg

:octocat:
View GitHub Profile
[react-class-to-functional-component]
# Geven this as input this should rewrite it in a functional component
#export class Example extends React.Component {
# componentDidMount() {
# // hii from componentDidMount
# }
# componentWillUnmount() {
# // hii from componentWillUnmount
@koenverburg
koenverburg / modules.ps1
Last active May 4, 2020 18:57
Getting started with powershell
Install-Module posh-git
Install-Module oh-my-posh -Scope CurrentUser
Install-Module -Name PSReadLine -AllowPrerelease -Scope CurrentUser -Force -SkipPublisherCheck
@koenverburg
koenverburg / Deploy.ftp.py
Last active July 4, 2018 14:39
Deploy scripts
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import os
import logging
import requests
import threading
from ftplib import FTP
logging.basicConfig(level=logging.INFO, format='[%(name)s][%(levelname)s] %(message)s')
@koenverburg
koenverburg / tripy.js
Created April 25, 2018 14:23
Tripping
(function() {
var ds = [];
function addtods(nodes) {
for (var i in nodes) {
ds.push(nodes[i]);
}
}
setInterval(function () {
ds = [];
addtods(document.getElementsByTagName('div'));
@koenverburg
koenverburg / webpack.dll.js
Last active November 2, 2017 14:00
webpack dll
var path = require('path');
var webpack = require('webpack');
// https://github.com/webpack/webpack/tree/master/examples/dll-user
// https://blog.hobbytrace.com/injecting-webpack-2-dll-with-hash-to-html-via-html-webpackplugin/
// read https://github.com/webpack/docs/wiki/list-of-plugins#dllreferenceplugin
// https://github.com/lettertwo/appcache-webpack-plugin
// https://github.com/NekR/offline-plugin
module.exports = {
@koenverburg
koenverburg / fun.js
Created May 29, 2017 08:57
a little script from a post on devrant
function main() {
let a = "end";
let b = "is near";
let c = "dude";
let output = `${b.substring(1,2)}${a} ${a.substring(1,2)}${c.substring(1, c.length)}${b.substring(1,2)}`;
console.log(output);
}
main();
/** Computes a top-shadow for a card effect.
* @param {Number} $depth - depth level
*/ @return {List}
@function top-shadow($depth) {
$primary-offset: nth(1.5 3 10 14 19, $depth) * 1px;
$blur: nth(1.5 3 10 14 19, $depth) * 4px;
$color: rgba(black, nth(.12 .16 .19 .25 .30, $depth));
@return 0 $primary-offset $blur $color;
}
@koenverburg
koenverburg / init.vim
Last active January 22, 2018 08:09
This is my .vimrc, i'm currently busy with a big refactor of my vim setup so this file with change a lot.
" .vimrc
" Author: CreativeKoen <creativekoen@gmail.com>
" Source: https://github.com/CreativeKoen/dotfiles
" Dein --------------------------------------------------------------------- {{{
set runtimepath+=~/AppData/local/nvim/bundle/repos/github.com/Shougo/dein.vim
set nocompatible
filetype off
#!/usr/bin/env bash
REPO='git@github.com:Servers-for-Hackers/deploy-ex.git';
RELEASE_DIR='/var/www/releases';
APP_DIR='/var/www/app';
RELEASE="release_`date +%Y%m%d%H%M%s`";
# Fetch Latest Code
[ -d $RELEASE_DIR ] || mkdir $RELEASE_DIR;
cd $RELEASE_DIR;
server {
listen 80;
root /vagrant/app/public;
index index.html index.htm index.php app.php app_dev.php;
# Make site accessible from ...
server_name 192.168.22.45.xip.io vaprobash.dev;