Skip to content

Instantly share code, notes, and snippets.

View rashkur's full-sized avatar
:octocat:

Roman S rashkur

:octocat:
View GitHub Profile
@gene1wood
gene1wood / all_aws_lambda_modules_python.md
Last active January 28, 2025 09:47
AWS Lambda function to list all available Python modules for Python 2.7 3.6 and 3.7
@dermesser
dermesser / libfcgi-example.c
Created July 3, 2014 11:14
In case anyone wants to see a multi-threaded FastCGI application written with the fcgiapp library.
# include <stdlib.h>
# include <stdio.h>
# include <sys/stat.h>
# include <pthread.h>
# include <fcgiapp.h>
const char* const sockpath = "/tmp/fcgicpp.sock";
#!/bin/bash
cp geo.conf geo.conf.old
wget -OGeoIPCountryCSV.zip -q http://geolite.maxmind.com/download/geoip/database/GeoLite2-Country-CSV.zip
csv_file=`unzip -qq -l GeoIPCountryCSV.zip */GeoLite2-Country-Blocks.csv | awk '{ print $4 }'`
csv_date=`unzip -qq -l GeoIPCountryCSV.zip */GeoLite2-Country-Blocks.csv | awk '{ print $2 }'`
anonymous
anonymous / gist:9531088
Created March 13, 2014 15:54
-- Хаос во всей инфраструктуре Майл Ру (вспомнить только колхоз при правке зон и мониторинга. мониторинг - отдельная грустная песня)
-- Монотонный неавтоматизированный труд. Большинство операций делается вручную или какими-то скриптами, которые каждый админ сам себе пишет. Даже нет интерфейсов для заведения админов. Это следствие следующего пункта
-- Расхождение интересов эксплуатации с интересами программистов:они работают чтобы сдать побольше тасков, реализующих новую бизнес-логику и ляпают нежизнеспособный код, который помимо плачевной стабильности ещё и в рабочем состоянии управляется инструментальным образом. Это выглядит, как если бы каналы на телевизоре можно было бы переключать только перемкнув отвёрткой нужные контакты под кожухом вместо удалённого управления пультом. Контакты тоже нужно знать или спрашивать у коллег, потому что документация неполна или отсутствует. Мы работаем, чтобы его эксплуатировать, нам выгоднее, чтобы он был стабильным и легко управляемым.
-- Непродвижение интересов руководств
@hgfischer
hgfischer / benchmark+go+nginx.md
Last active January 6, 2025 09:05
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
@avar
avar / 30-income-calculon.pl
Last active August 15, 2024 15:13
Calculate your income in The Netherlands with and without a 30% ruling.
# To check if this is up-to-date with the tax rates go to
# http://www.expatax.nl/tax-rates-2016.php and see if there's anything
# newer there.
#
# I make no guarantees that any of this is correct. I calculated this
# at the time and have been updating it when new tax rates come along
# because people keep finding this useful.
#
# There's also an interactive JS version of this created by
# @stevermeister at