Skip to content

Instantly share code, notes, and snippets.

View tbreuss's full-sized avatar
🚴‍♂️
Biking

tebe tbreuss

🚴‍♂️
Biking
View GitHub Profile
@fredbenenson
fredbenenson / kickstarter_sql_style_guide.md
Last active April 2, 2024 15:19
Kickstarter SQL Style Guide
layout title description tags
default
SQL Style Guide
A guide to writing clean, clear, and consistent SQL.
data
process

Purpose

@thephez
thephez / json-rpc-oas-example.json
Created December 4, 2018 17:33
Example of describing JSON-RPC 2.0 API with OpenAPI
{
"x-send-defaults": true,
"openapi": "3.0.0",
"x-api-id": "json-rpc-example",
"info": {
"title": "JSON-RPC OpenAPI",
"version": "1.0.0",
"description": "Example of how to describe a JSON-RPC 2 API in OpenAPI"
},
"servers": [
@joakimbeng
joakimbeng / router.html
Last active March 15, 2024 06:18
A really simple Javascript router
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Building a router</title>
<script>
// Put John's template engine code here...
(function () {
// A hash to store our routes:
@kristopherjohnson
kristopherjohnson / Makefile
Last active March 14, 2024 20:42
Makefile that uses Pandoc to generate HTML, PDF, DOCX, etc. from Markdown source files
# Makefile
#
# Converts Markdown to other formats (HTML, PDF, DOCX, RTF, ODT, EPUB) using Pandoc
# <http://johnmacfarlane.net/pandoc/>
#
# Run "make" (or "make all") to convert to all other formats
#
# Run "make clean" to delete converted files
# Convert all files in this directory that have a .md suffix
@pandafulmanda
pandafulmanda / Python3 Virtualenv Setup.md
Last active March 12, 2024 15:59 — forked from akszydelko/Python3 Virtualenv Setup.md
Setting up and using Python3 Virtualenv on Mac

Python3 Virtualenv Setup

Requirements
  • Python 3
  • Pip 3
$ brew install python3
@branneman
branneman / Struct.php
Created May 2, 2011 09:53
PHP Struct class
<?php
class Struct
{
/**
* Define a new struct object, a blueprint object with only empty properties.
*/
public static function factory()
{
$struct = new self;
foreach (func_get_args() as $value) {
@andyshinn
andyshinn / composer.json
Last active February 18, 2024 12:05
Docker Compose PHP Composer Example
{
"require": {
"mfacenet/hello-world": "v1.*"
}
}
@codeaid
codeaid / daogen.php
Last active February 18, 2024 11:45
PHP DAO generator
#!/usr/bin/php
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
$host = '127.0.0.1';
$user = 'root';
$pass = '';
$db = 'test';
@im4aLL
im4aLL / php-event-listener-example.php
Last active February 7, 2024 07:52
PHP event listener simple example
<?php
// Used in https://github.com/im4aLL/roolith-event
class Event {
private static $events = [];
public static function listen($name, $callback) {
self::$events[$name][] = $callback;
}
@tbreuss
tbreuss / dnsbl.php
Last active December 21, 2023 20:29
IP Blacklist Check Script - This is a simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once.
<?php // Simple PHP script to lookup for blacklisted IP against multiple DNSBLs at once. ?>
<html>
<head>
<title>DNSBL Lookup Tool - IP Blacklist Check Script</title>
</head>
<body>
<h2>IP Blacklist Check Script</h2>
<form action="<?php echo $_SERVER['PHP_SELF'] ?>" method="post">
<input type="text" value="" name="ip"/>
<input type="submit" value="LOOKUP"/>