Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
#! /usr/bin/python | |
""" | |
This simple script makes it easy to create server certificates | |
that are signed by your own Certificate Authority. | |
Mostly, this script just automates the workflow explained | |
in http://www.tc.umn.edu/~brams006/selfsign.html. | |
Before using this script, you'll need to create a private |
CREATE TABLE node (name varchar PRIMARY KEY, is_child_of varchar REFERENCES node (name), some_int integer NOT NULL); | |
CREATE INDEX node_is_child_of_idx ON node (is_child_of); | |
-- Fill the table with nice big random tree | |
WITH RECURSIVE | |
path_node AS ( | |
SELECT | |
md5(chr(CAST(floor(random() * 223) AS integer) + 32) || random()) AS name, | |
NULL AS is_child_of, | |
0 AS some_int, |
/* License MIT */ | |
var spawn = require( 'child_process' ).spawn, | |
colors = require( 'colors' ); | |
/* | |
Executes a command and fires event when done that | |
will return the command output | |
*/ | |
function system( cmd ){ |
/** Native NodeJS */ | |
var http = require('http') | |
, server = http.createServer(function(req) { | |
console.log(req.headers['user-agent']); | |
}); | |
server.listen(3000, 'localhost'); | |
/** NodeJS with Express */ | |
var express = require('express') |
from datetime import datetime | |
from sqlalchemy import Column, Integer, DateTime, ForeignKey | |
from sqlalchemy.orm import relationship | |
from sqlalchemy.ext.declarative import declared_attr | |
from flask_security import current_user | |
class AuditMixin(object): | |
created_at = Column(DateTime, default=datetime.now) | |
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now) |
<?php | |
/** | |
* A helper file for Laravel 5, to provide autocomplete information to your IDE | |
* Generated for Laravel 5.5.13 on 2017-09-28. | |
* | |
* @author Barry vd. Heuvel <[email protected]> | |
* @see https://github.com/barryvdh/laravel-ide-helper | |
*/ | |
namespace { | |
exit("This file should not be included, only analyzed by your IDE"); |
Original link: http://www.concentric.net/~Ttwang/tech/inthash.htm
Taken from: http://web.archive.org/web/20071223173210/http://www.concentric.net/~Ttwang/tech/inthash.htm
Reformatted using pandoc
Thomas Wang, Jan 1997
last update Mar 2007
#!/usr/bin/env bash | |
echo ">>> Starting Install Script" | |
# Update | |
sudo apt-get update | |
# Install MySQL without prompt | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
FROM ubuntu:13.10 | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND=noninteractive apt-get -y install golang | |
RUN mkdir /go | |
RUN export GOPATH=/go | |
ENV GOPATH /go | |
RUN export PATH=$PATH:$GOPATH/bin |
# Run `git difftool <directory/file>...` or `git mergetool <directory/file>...` | |
[merge] | |
tool = phpstorm | |
[diff] | |
tool = phpstorm | |
[difftool] | |
prompt = false | |
[difftool "phpstorm"] | |
cmd = /Applications/PhpStorm\\ EAP.app/Contents/MacOS/phpstorm diff $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") | |
trustExitCode = true |