Skip to content

Instantly share code, notes, and snippets.

View therealssj's full-sized avatar

therealssj therealssj

  • localhost
View GitHub Profile
@therealssj
therealssj / clone-all-twitter-github-repos.sh
Created May 30, 2016 05:58 — forked from caniszczyk/clone-all-twitter-github-repos.sh
Clone all repos from a GitHub organization
curl -s https://api.github.com/orgs/twitter/repos?per_page=200 | ruby -rubygems -e 'require "json"; JSON.load(STDIN.read).each { |repo| %x[git clone #{repo["ssh_url"]} ]}'
@therealssj
therealssj / phpmd_drupal_ruleset.xml
Created June 13, 2016 02:48 — forked from josephdpurcell/phpmd_drupal_ruleset.xml
PHP Mess Detector Ruleset for Drupal.
<?xml version="1.0"?>
<ruleset
name="PMD Ruleset for Drupal"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"
>
<rule ref="rulesets/unusedcode.xml" />
<rule ref="rulesets/codesize.xml">
<exclude name="ExcessiveMethodLength" />
@therealssj
therealssj / benchmark+go+nginx.md
Created August 20, 2017 07:57 — forked from hgfischer/benchmark+go+nginx.md
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
#!/bin/sh
lsof>lsof.log
cat lsof.log | awk '{ print $2 " " $1; }' | sort -rn | uniq -c | sort -rn | head -20

Keybase proof

I hereby claim:

  • I am therealssj on github.
  • I am therealssj (https://keybase.io/therealssj) on keybase.
  • I have a public key whose fingerprint is B6F3 6C82 7222 0EAE 6F08 7056 0548 D0DE 70DC C85B

To claim this, I am signing this object:

@therealssj
therealssj / nginx with lua
Created May 31, 2018 23:36
install nginx with lua support
#!/bin/sh
# Script to compile nginx on ubuntu with lua support.
NGX_VERSION='1.13.1'
LUAJIT_VERSION='2.0.5'
LUAJIT_MAJOR_VERSION='2.0'
NGX_DEVEL_KIT_VERSION='0.3.0'
LUA_NGINX_MODULE_VERSION='0.10.9rc6'
@therealssj
therealssj / attestation.txt
Created March 27, 2021 10:31
zkparty phase2 tusted setup MPC contribution summary
{
"ceremony": "zk_transaction_1_1",
"ceremonyId": "hIfLWePJPn6ldES7OZjB",
"time": "2021-03-27T10:31:46.073Z",
"contributionNumber": 102,
"hash": "d7564ea0 430f8539 4b83b5ef 74d8ad2b\n 58f7ed87 221521a9 aff4cc63 70cb505b\n 5b1d9697 c8506e6f ebe27c9c 7d94dd60\n d5409985 db818a36 7f73ad0f 1f45ddd1\n"
}
@therealssj
therealssj / attestation.txt
Created March 27, 2021 10:32
zkparty phase2 tusted setup MPC contribution summary
{
"ceremony": "zk_transaction_1_2",
"ceremonyId": "3lHsQDxM4lQKxkwA0Oyj",
"time": "2021-03-27T10:32:31.291Z",
"contributionNumber": 94,
"hash": "bd41622c 794818ad 61d60bbb c570e9cc\n f9a198f1 29cc2295 b33142b3 51d75eb0\n 2d1071fd 592099be 3883af65 11196ec7\n 41dad21d 35093403 253e696d 081522ba\n"
}
@therealssj
therealssj / attestation.txt
Created March 27, 2021 10:33
zkparty phase2 tusted setup MPC contribution summary
{
"ceremony": "zk_transaction_1_3",
"ceremonyId": "k9CJHwJoeSRMGtjHUiF6",
"time": "2021-03-27T10:33:16.004Z",
"contributionNumber": 87,
"hash": "0cc92959 ca6ca719 2bf3e232 6049c1a4\n ef046119 a4780deb 69fa648d a21e7fbd\n 4ae9b2a6 46681c05 b16fcc03 11f9fc70\n 3a69d675 20c4bc3d 9549ad7d 38ba2445\n"
}
@therealssj
therealssj / attestation.txt
Created March 27, 2021 10:34
zkparty phase2 tusted setup MPC contribution summary
{
"ceremony": "zk_transaction_1_4",
"ceremonyId": "VgOEuoAjThuaDosXRroW",
"time": "2021-03-27T10:34:01.281Z",
"contributionNumber": 86,
"hash": "80aad9f6 a6d827a9 a4b72280 0f0ae3bb\n c52f0217 9faebf3f de30399c 6d6faf35\n 51c62bc5 817479f5 2f843297 63886dfa\n c5556f0c 0df4ecb4 f0b6c12f 8385caa9\n"
}