Skip to content

Instantly share code, notes, and snippets.

View jverdeyen's full-sized avatar

Joeri Verdeyen jverdeyen

View GitHub Profile
@xphyr
xphyr / index.js
Created July 14, 2013 13:49
Simple Plugin for "Uptime" that send alerts via Pushover. I am not a Node hacker ... I barely understand why this code works .... but it does. I have not tried it with multiple users yet, so dont know if it will work to do multiple notifications. Let me know if you try it.
/**
* Pushover plugin for the uptime project - https://github.com/fzaninotto/uptime
* Thanks to DMathieu for the Campfire plugin which I basically hacked up to make this
* work: https://gist.github.com/dmathieu/5592418
*
* This index.js files goes to a directory `plugins/pushover` in your installation of uptime.
*
* Notifies all events (up, down, paused, restarted) to pushover
*
* This plugin has a dependency on `pushover-notifications`.
@paragonie-scott
paragonie-scott / strict.md
Last active November 18, 2017 07:07
PHP7 Strict Typing or Else

Let's say you have a file like this:

<?php
declare(strict_types=1);

class Foo
{
    protected $x;
    public function __construct(array $x = [])
@warnergodfrey
warnergodfrey / Gemfile
Last active December 14, 2017 01:10
Instructions for running remote JMeter
source 'https://rubygems.org'
gem 'ruby-jmeter', github: 'lukeck/ruby-jmeter'
@tomhennigan
tomhennigan / fliptables.sh
Created November 9, 2012 16:25
Happy friday
#!/bin/sh
frames=( "(╮°-°)╮ ┳━┳" "(╯°o°)╮ ┳━┳" "(╯°o°)╯ ︵ ╡" "(╯°o°)╯ ︵┻━┻" "(╮°□°)╮ ┻━┻" );
for frame in "${frames[@]}"; do
printf "%s\033[0K\r" "${frame}";
sleep 0.5;
done
@egonSchiele
egonSchiele / why.markdown
Last active July 20, 2018 01:40
Why read Grokking Algorithms?

If you have already taken a course in algorithms, why read Grokking Algorithms (manning.com/bhargava)?

If you were learning graph algorithms, which approach would you prefer:

  1. Imagine you have to take public transit from your home to your office. How do you figure out the fastest route? Use graph algorithms! OR

  2. We can choose between two standard ways to represent a graph G = (V, E): as a collection of adjacency lists or as an adjacency matrix. Either way applies to both directed and undirected graphs.

I prefer the first way: lead with lots of examples, and clear writing. The second way is an excerpt from "Introduction to Algorithms"...that's how they start their section on graph algorithms.

@romansklenar
romansklenar / Blob.php
Created August 15, 2010 03:36
Doctrine 2, BLOB datatype implementation
<?php
/*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
@dbu
dbu / README.md
Last active October 2, 2018 11:57
Convert NelmioApiDocBundle annotations to Swagger PHP

A Symfony command to convert from NelmioApiDocBundle annotations to Swagger-PHP annotations.

This code is provided as is. Make sure to have your code committed to version control before running the command. Check if things work out and if not, use version control to reset the automated changes and fix the command.

#!/usr/bin/env php
<?php
include_once 'app/global_vars.php';
require ROOT_DIR . 'vendor/autoload.php';
use Application\Command\InsertFixturesCommand;
use Symfony\Component\Console\Application;
@albertohm
albertohm / graphite.md
Last active February 4, 2019 23:59
Install and configure graphite on ubuntu

Install python-pip

sudo apt-get install python-pip libcairo2 python-cairo

Install Graphite and Dependencies

pip install carbon
pip install whisper
pip install django
pip install django-tagging
pip install graphite-web
@mtnygard
mtnygard / jenkins.json
Last active October 14, 2019 09:35
Packer.io template for a Jenkins server
{
"builders": [{
"type": "amazon-ebs",
"access_key": "",
"secret_key": "",
"region": "us-east-1",
"source_ami": "ami-de0d9eb7",
"instance_type": "m1.large",
"ssh_username": "ubuntu",
"ami_name": "packer-jenkins {{.CreateTime}}"