Skip to content

Instantly share code, notes, and snippets.

Marak

Block or report user

Report or block Marak

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View haproxy_rate_limiting.md

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])

@Marak
Marak / index.html
Created Mar 17, 2016
quick template
View index.html
<h1>hello world</h1>
@Marak
Marak / chinese-lorem-translated.js
Last active Feb 8, 2016
translation from pull request to faker.js for adding chinese lorem ipsum
View chinese-lorem-translated.js
module [ "exports"] = [
'Abba', 'Achang', 'A big,' 'Adi', 'fools', 'hooligan', 'Afu', 'princes', 'donkey', 'Liza', 'Allah' 'Ali', 'Mom,' 'Oman', 'Mei', 'Niang'
'Lady', 'Auntie', 'flattery', 'Egypt', 'suffer side', 'one by one', 'beaten', 'wait until', 'hungry', 'one by one', 'survive', ' suffer shoulder, '' near to ',' scolded '' Punished ',' next '
'Beating', 'Damn,' 'Oh,' 'cancer', 'cancer', 'cancer', 'Airan', 'Wormwood', 'Fitch', 'Ai Peng', 'moxa', ' Artemisia ',' be too embarrassed to mention ',' find it difficult to ',' in the way ',' eyesore '
'Due', 'pet name', 'love', 'love', 'caress',' patriotism ',' loving ',' love ',' love ',' lovingly ',' love ',' Amy ',' loving ',' love ',' daughter ',' wife '
'Love', 'love', 'love that', 'hear', 'care', 'small love', 'love', 'love and hate', 're-love', 'love child', 'Pass' 'horse', 'saddle', 'amino' 'ammonia', 'ammonia'
'Placement', 'Anderson', 'Andhra', 'stable', 'settled', 'placed', 'law-abiding', 'appease', 'well', 'Anhui', 'settle down', 'quiet'
@Marak
Marak / 4channelz1.tsi
Created Oct 14, 2015
traktor z1 4 channel mixer
View 4channelz1.tsi
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<NIXML><TraktorSettings><Entry Name="DeviceIO.Config.Controller" Type="3" Value="RElPTQAAJiBESU9JAAAABAAAAAFERVZTAAAmDAAAAAFERVZJAAAmAAAAABoAVAByAGEAawB0AG8AcgAuAEsAbwBuAHQAcgBvAGwAIABaADEALgBEAGUAZgBhAHUAbAB0RERBVAAAJcBERElGAAAABAAAAABERElWAAAAGgAAAAkAMgAuADYALgA0ACAARABlAHYAAAAYRERJQwAAAAQAAAAARERQVAAAACwAAAAJAEsAbwBuAHQAcgBvAGwAWgAxAAAACQBLAG8AbgB0AHIAbwBsAFoAMUREREMAAAY2RERDSQAABBgAAAATRENEVAAAACAAAAAEAE0AbwBkAGUAAAABAAAAAD+AAAAAAAADAAAAAERDRFQAAAAuAAAACwBDAHIAbwBzAHMAIABGAGEAZABlAHIAAAACAAAAAD+AAAAAAAADAAAAAURDRFQAAAAmAAAABwBDAHUAZQAgAE0AaQB4AAAAAgAAAAA/gAAAAAAAAwAAAAJEQ0RUAAAAPAAAABIATABlAGYAdAAuAEYAaQBsAHQAZQByACAATwBuAC8ATwBmAGYAAAABAAAAAD+AAAAAAAADAAAAA0RDRFQAAAA+AAAAEwBSAGkAZwBoAHQALgBGAGkAbAB0AGUAcgAgAE8AbgAvAE8AZgBmAAAAAQAAAAA/gAAAAAAAAwAAAANEQ0RUAAAAKAAAAAgATABlAGYAdAAuAEMAdQBlAAAAAQAAAAA/gAAAAAAAAwAAAAREQ0RUAAAAKgAAAAkAUgBpAGcAaAB0AC4AQwB1AGUAAAABAAAAAD+AAAAAAAADAAAABERDRFQAAAAqAAAACQBMAGUAZgB0AC4ARwBhAGkAbgAAAAIAAAAAP4AAAAAAAAMAAAAFRENEVAA
@Marak
Marak / testHook.js
Created Oct 11, 2015
My first hook.io microservice
View testHook.js
print("Hello, this is a Python script.")
print("Hook['params'] is populated with request parameters")
print(Hook['params']['hook'])
print("Hook['req'] is the http request")
print(Hook['req']['url'])
View lifeMeter.js
module['exports'] = function (hook) {
var rest = require('restler'),
moment = require('moment');
var myGender = 'male',
myCountry = 'United States',
myDOB = '1986-05-01';
var currentDate = moment();
@Marak
Marak / dockerCheatSheet.md
Last active May 23, 2017
docker cheat sheet
View dockerCheatSheet.md

Things I wish I knew before I started using Docker

Commands

Init docker on mac os

boot2docker init

Restart docker vm on mac os

boot2docker up
@Marak
Marak / testHook.js
Created Sep 11, 2015
My first hook.io microservice
View testHook.js
module['exports'] = function simpleHttpRequest (hook) {
// npm modules available, see: http://hook.io/modules
var request = require('request');
request.get('http://httpbin.org/ip', function(err, res, body){
if (err) {
return hook.res.end(err.messsage);
}
hook.res.end(body);
})
};
@Marak
Marak / testHook.js
Created Sep 3, 2015
My first hook.io microservice
View testHook.js
// A simple hello world microservice
// Click "Deploy Service" to deploy this code
// Service will respond to HTTP requests with a string
module['exports'] = function helloWorld (hook) {
// hook.req is a Node.js http.IncomingMessage
var host = hook.req.host;
// hook.res is a Node.js httpServer.ServerResponse
// Respond to the request with a simple string
hook.res.end(host + ' says, "Hello world!"');
};
You can’t perform that action at this time.