Skip to content

Instantly share code, notes, and snippets.

@jpvincent
jpvincent / optimizedFor.js
Last active November 25, 2021 17:12
never blocking loop mechanism, using setTimeout 0 trick and time control to break the loop and let the browser breath
/**
* NEVER BLOCKING LOOP : implementation of the infamous setTimeout 0 hack, with time checking in order to guarantee fluidity without sacrificing execution speed.
*
* USAGE :
* var array = ["a way too big array that is heavy to process"]
* optimizeFor({
* nbIterations: array.length,
* each:function( index ) {
* doSomethingUsefulWith( array[ index ] );
* },
@refractalize
refractalize / docker-rhel-7.md
Last active April 18, 2016 15:27
Running Docker on RHEL 7

RPM repositories

subscription-manager repos --enable=rhel-7-server-extras-rpms
subscription-manager repos --enable=rhel-7-server-optional-rpms

Install

yum install docker

Startup options

@alkar
alkar / VyOS on EC2
Created June 6, 2014 15:04
Setting up a VyOS EC2 instance to connect two VPCs
interfaces {
vti vti0 {
address <CGW_INTERNAL_IP_A>/30
description "VPC Tunnel A"
mtu 1436
}
vti vti1 {
address <CGW_INTERNAL_IP_B>/30
description "VPC Tunnel B"
mtu 1436
@ekristen
ekristen / check_docker_container.sh
Last active November 13, 2024 18:11
Bash Script for Nagios to Check Status of Docker Container
#!/bin/bash
# Author: Erik Kristensen
# Email: erik@erikkristensen.com
# License: MIT
# Nagios Usage: check_nrpe!check_docker_container!_container_id_
# Usage: ./check_docker_container.sh _container_id_
#
# Depending on your docker configuration, root might be required. If your nrpe user has rights
# to talk to the docker daemon, then root is not required. This is why root privileges are not
@msmuenchen
msmuenchen / gist:9318327
Last active April 20, 2025 09:32
KeePass v2.x (KDBX v3.x) file format
Convention: Byte array notation as it would appear in a hexeditor.
= Layout=
KDBX files, the keepass database files, are layout as follows:
1) Bytes 0-3: Primary identifier, common across all kdbx versions:
private static $sigByte1=[0x03,0xD9,0xA2,0x9A];
2) Bytes 4-7: Secondary identifier. Byte 4 can be used to identify the file version (0x67 is latest, 0x66 is the KeePass 2 pre-release format and 0x55 is KeePass 1)
package com.esoftdive.core.smpp.internal;
import java.util.Random;
import com.cloudhopper.commons.charset.CharsetUtil;
import com.cloudhopper.smpp.SmppConstants;
import com.cloudhopper.smpp.SmppSession;
import com.cloudhopper.smpp.pdu.SubmitSm;
import com.cloudhopper.smpp.type.Address;
@jhrr
jhrr / Functional Core, Imperative Shell
Last active January 8, 2018 16:11
Notes and links for ideas about Gary Bernhardt's "functional core, imperative shell"
http://www.infoq.com/presentations/Simple-Made-Easy
http://www.infoq.com/presentations/integration-tests-scam
http://blog.thecodewhisperer.com/2010/09/14/when-is-it-safe-to-introduce-test-doubles
http://youtu.be/yTkzNHF6rMs
http://pyvideo.org/video/1670/boundaries
http://skillsmatter.com/podcast/ajax-ria/enumerators
http://alistair.cockburn.us/Hexagonal+architecture
http://c2.com/cgi/wiki?PortsAndAdaptersArchitecture
http://www.confreaks.com/videos/977-goruco2012-hexagonal-rails
http://www.confreaks.com/videos/1255-rockymtnruby2012-to-mock-or-not-to-mock
@noteed
noteed / docker.md
Last active December 24, 2015 23:48
List of Docker things.

Docker things

  • quay.io (now acquired by CoreOS)
    • 5/10/20/50/125 private repositories for $12/$25/$50/$100/$200 (it was $7/$12/$22 for 5/10/20 repositories before) per month
    • unlimited public repositories
  • Reesd
    • 10GB/25GB/50GB for €20/€45/€80 per month
    • Illimited number of repositories/images/layers, only compressed layer space counts.
    • Disclaimer: it is a project of mine.
  • Now in beta :-)
@dexterbt1
dexterbt1 / full-stack-developer.txt
Last active May 4, 2018 06:45
Full Stack Developer
Job Title:
Developer (Full-Stack)
Overall Description:
Develop, maintain, extend, and operate Platform and Services around Mobile, Voice and Web technologies.
Background:
We are IG Group of Companies, a specialist technology group focused in helping our clients make a difference
in the Mobile / Enterprise / Telco solutions space. We have always been pioneering innovators and have
consistently maintained leadership in the industry; seen as top-of-mind, go-to partners by our clients.
@bradmontgomery
bradmontgomery / install-comodo-ssl-cert-for-nginx.rst
Last active June 18, 2026 17:53
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert