Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@richp10
richp10 / gist:9290480
Created March 1, 2014 14:26
Configure docker host
#!/bin/bash
# This configures the HOST machine that will run docker
# Note we need Ubuntu Raring 13.04 and Saucy 13.10 (64 bit) for the HOST
# See http://docs.docker.io/en/latest/installation/ubuntulinux/#ubuntu-raring-saucy
mkdir -p /src
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
apt-get -y update && apt-get -y upgrade
@richp10
richp10 / gist:464e363a321c7238fbd3
Created August 24, 2015 09:04
PHP phpdaemon dependencies
#!/bin/bash
export CHOST="x86_64-pc-linux-gnu"
export CFLAGS="-march=native -O3 -pipe -Wall -D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=native"
export CXXFLAGS="${CFLAGS}"
__prep() {
yum -y remove libevent
yum -y install gcc cmake openssl-devel
}
@richp10
richp10 / gist:996de77b3563d1c1577c
Created September 28, 2015 18:31 — forked from EspadaV8/gist:1357237
Script to import Geonames into PostgreSQL taken from http://forum.geonames.org/gforum/posts/list/15/926.page
#!/bin/bash
#===============================================================================
#
# FILE: getgeo.sh
#
# USAGE: ./getgeo.sh
#
# DESCRIPTION: run the script so that the geodata will be downloaded and inserted into your
# database
#
<?php
declare(strict_types=1);
// ***************************************************************
// bugRepMailer.php version: 1.2 · date: 2012-05-06
// -------------------------------------------------------------
// exception handling
// -------------------------------------------------------------
// Copyright (C) 1999 - 2012 www.madshi.net, All Rights Reserved
// ***************************************************************
// Copyright 2016 Tom Thorogood. All rights reserved.
// Use of this source code is governed by a
// Modified BSD License license that can be found in
// the LICENSE file.
//
// Copyright 2014 Christian Schramm. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package main
@richp10
richp10 / GetSha1
Created July 11, 2018 15:25
Delphi 7 Sha1
unit Sha1;
interface
uses
SysUtils;
// No range and overflow checking, do not remove!!!
{$R-}
{$Q-}
@richp10
richp10 / gist:1c367d3c67aec762788e
Created May 10, 2014 10:19
Secure iptables configuration for coreos ??
// This systemd runs iptables-restore on boot:
[Unit]
Description=Packet Filtering Framework
DefaultDependencies=no
After=systemd-sysctl.service
Before=sysinit.target
[Service]
Type=oneshot
ExecStart=/usr/sbin/iptables-restore /opt/docker/scripts/iptables/iptables.rules
@richp10
richp10 / client.go
Created September 24, 2019 07:41
Minimal not working pion SCTP example..
package main
import (
"fmt"
"net"
"strconv"
"time"
"github.com/pion/logging"
"github.com/pion/sctp"
@richp10
richp10 / gist:2938dbd28300241d444f45eb5d1d364f
Created January 31, 2018 10:50
Disposable email domains
0-mail.com
001.igg.biz
027168.com
0815.ru
0815.ry
0815.su
0845.ru
0box.eu
0clickemail.com
0u.ro