Skip to content

Instantly share code, notes, and snippets.

View diversen's full-sized avatar

Dennis Iversen diversen

View GitHub Profile
@nhunzaker
nhunzaker / viewport.js
Created October 23, 2012 19:29
Viewports in Phantom.js
// Viewport
//
// phantom.js viewport.js http://google.com 400
var args = require("system").args;
var url = args[1];
var width = args[2];
var height = args[3];
@diversen
diversen / phar-composer-usage-example.md
Last active December 31, 2016 16:32
notes about phar-composer

phar-composer example

Create a composer dir called pgit

Create a composer.json file inside this dir containing:

{
    "require": {
 "diversen/minimal-cli-framework": "^1.1"
@olizilla
olizilla / traffic-light-disco.js
Created July 22, 2013 19:14
A johnny-five, event based, traffic light disco for your Arduino. An array of lights flash in majestic sequence for your gyratory pleasure. Each light's shining heralds it's own destruction, each extinction seeds a new. Just like the traffic light eyeball cannons of your friendly neighbourhood mobile DJ
/*
======================================================================================================================================
= ==================== ===== =================== =================== ================ ===========================
==== ====================== == === == ================== =================== ================ ==== ==========================
==== ====================== ======= ====================== =================== ====== ======== ==== ==========================
==== ===== = ==== === ===== ===== === ======== ======== === === ===== ======= ==== == === ==== ==== ==
==== ===== = == = === ======= ========== = ======= ============ = == ==== ======== ==== ====== = == = == =
==== ===== ========== === ======= ====== == ========== ======== === == = === ======== ==== == === ==== ===== = =
==== ===== ======== === ======= ====== == ========== ======== ==
@soska
soska / index.html
Created December 29, 2016 14:32 — forked from anonymous/index.html
Musical Chord Progression Arpeggiator
<article>
<aside id="aside"></aside>
<main id="main"></main>
</article>
anonymous
anonymous / index.html
Created December 29, 2016 02:38
Musical Chord Progression Arpeggiator
<article>
<aside id="aside"></aside>
<main id="main"></main>
</article>
@cburgdorf
cburgdorf / xor_keras.py
Last active November 18, 2020 11:23
Comparing XOR between tensorflow and keras
import numpy as np
from keras.models import Sequential
from keras.layers.core import Activation, Dense
training_data = np.array([[0,0],[0,1],[1,0],[1,1]], "float32")
target_data = np.array([[0],[1],[1],[0]], "float32")
model = Sequential()
model.add(Dense(32, input_dim=2, activation='relu'))
model.add(Dense(1, activation='sigmoid'))
@diversen
diversen / backup-wordpress-single-file.sh
Last active July 5, 2021 10:38
Single file wordpress backup script using rsync and mysqldump
#!/usr/bin/env php
<?php
/**
* Wordpress backup without any configuration
*
* USAGE:
*
* ./wordpress-backup.php path/to/basepath/of/wordpress/
*
@rajeevkannav
rajeevkannav / pdf2htmlEX.sh
Last active March 29, 2022 18:28
Install CMake, pkg-config,GNU Getopt,GCC,poppler,fontforge,pdf2htmlEX in Ubuntu 15.05
#!/bin/bash
# Ubuntu Developer Script For pdf2htmlEx
# Created by Rajeev Kannav Sharma
# http://rajeevkannav.github.io/
#
#
# Downloads and configures the following:
#
# CMake, pkg-config
# GNU Getopt
@bosmacs
bosmacs / latex.template
Created June 28, 2011 19:39 — forked from michaelt/latex.template
Simple Pandoc latex.template with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.
@KrzysztofPrzygoda
KrzysztofPrzygoda / htpasswd.php
Last active September 19, 2022 07:37
A simple PHP .htpasswd and .htaccess generator
<pre>
<?php
/**
* A simple PHP .htpasswd and .htaccess generator
* If already present, .htpasswd is overwrittern but .htaccess is prepended with Access clousure if not found
*
* @author Krzysztof Przygoda, 2018
* @version 1.0
*/