Skip to content

Instantly share code, notes, and snippets.

@HowardMei
HowardMei / syncthing
Created October 17, 2015 18:14 — forked from arudmin/syncthing
/etc/init.d/syncthing script for Raspberry Pi (or any Ubuntu/Debian)
#!/bin/sh
### BEGIN INIT INFO
# Provides: syncthing
# Required-Start: $local_fs $remote_fs
# Required-Stop: $local_fs $remote_fs
# Should-Start: $network
# Should-Stop: $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Multi-user daemonized version of syncthing.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
#!/bin/bash
# source: http://stackoverflow.com/questions/4023830/bash-how-compare-two-strings-in-version-format
vercomp () {
if [[ $1 == $2 ]]
then
return 0
fi
local IFS=.

License

All code providing basic infrastructure services will be Open Source. Closed source code may be used to access APIs or used in VMs started with the exchange. However, no closed source code which provides service to the infrastructure or network will be promoted by the network. Infrastructure is meant to be open and trustworthy.

Concept

The underlying concept is a cryptcoin operated 'compute exchange' powered by multiple OpenStack cluster deployments. These deployments are run by 'providers' and managed by 'compute pools'. A provider can participate in multiple pools by running multiple virtual appliance 'controllers'.

Various compute pools can provide levels of reliability, diverse instance types, custom OS images, unique branding, community reach and more. Diversification is encouraged and welcome.

It is the intent of this project to create a fully distributed compute exchange which greatly minimizes the central control authority for server starts and access.

@HowardMei
HowardMei / nginx.conf
Created November 18, 2013 01:52 — forked from plentz/nginx.conf
#don't send the nginx version number in error pages and Server header
server_tokens off;
# config to enable HSTS(HTTP Strict Transport Security) https://developer.mozilla.org/en-US/docs/Security/HTTP_Strict_Transport_Security
# to avoid ssl stripping https://en.wikipedia.org/wiki/SSL_stripping#SSL_stripping
add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
# config to don't allow the browser to render the page inside an frame or iframe
# and avoid clickjacking http://en.wikipedia.org/wiki/Clickjacking
# if you need to allow [i]frames, you can use SAMEORIGIN or even set an uri with ALLOW-FROM uri

Comment Blacklist for WordPress

Sometimes a simple solution is a better solution.

Over the past couple of years, I have identified over 6,100 phrases, patterns, and keywords commonly used by spammers and comment bots in usernames, email addresses, link text, and URIs. This blacklist is still a work in progress and there is certainly room for optimization. Suggestions are always appreciated.

How Do I Use It?

Copy the list of keywords, paste it into the Comment Blacklist field of your WordPress Discussion Settings panel, and click the “Save Changes” button.

Building Riak on SmartOS, the hard way

Build Machine

Here is some information on the build machine I'm using for reference:

  1. Dataset

    $ dsadm list

UUID OS PUBLISHED URN

'''
Based on:
- Read this for EC2 setup info and the approach - http://www.dikant.de/2010/10/08/setting-up-a-vpn-server-on-amazon-ec2/
- https://gist.github.com/1130401
- EC2 fabric bits via - https://github.com/slacy/fabric-ec2
'''
import boto
@HowardMei
HowardMei / install_profile.php
Created October 30, 2012 14:51
New Wordpress Install Profile
<?php
//$base_dir = '/home/username/www/wordpress';
//chdir($base_dir);
define( 'WP_SITEURL', 'http://localhost/wordpress' );
define( 'WP_INSTALLING', true );
require_once 'wp-load.php';
require_once 'wp-admin/includes/upgrade.php';