Skip to content

Instantly share code, notes, and snippets.

@t0d0r
t0d0r / gist:395e4d4d9fce9f8be8a7a77490158fad
Created January 9, 2019 12:22 — forked from pitch-gist/gist:2999707
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@t0d0r
t0d0r / haproxy_rate_limiting.md
Created December 22, 2018 20:10 — forked from procrastinatio/haproxy_rate_limiting.md
Rate limiting with HAproxy

Introduction

So HAProxy is primalery a load balancer an proxy for TCP and HTTP. But it may act as a traffic regulator. It may also be used as a protection against DDoS and service abuse, by maintening a wide variety of statistics (IP, URL, cookie) and when abuse is happening, action as denying, redirecting to other backend may undertaken ([haproxy ddos config], [haproxy ddos])

@t0d0r
t0d0r / index.md
Created May 1, 2017 19:09 — forked from rstacruz/index.md
Rails models cheatsheet

Rails Models

Generating models

$ rails g model User

Associations

belongs_to

has_one

@t0d0r
t0d0r / groovy-daemon
Created February 9, 2012 08:12 — forked from thekindofme/groovy-daemon
bash script to run java app as a daemon
#!/bin/bash
#
# Derived from -
# Joshua Davis
# http://shrubbery.mynetgear.net/c/display/W/Java+Daemon+Startup+Script
#
# This is a modification of the original script (which lets you run a java program as a deamon.
# look bellow for more information) that lets you run a groovy script as a deamon.
#
# ============== OLD SCRIPT TEXT ==============