Skip to content

Instantly share code, notes, and snippets.

View shovon's full-sized avatar
💻
Working on my own projects

Sal Rahman shovon

💻
Working on my own projects
View GitHub Profile
(function() {
'use strict';
var indexOf = function(list, needle) {
if (list.indexOf) return list.indexOf(needle);
for (var i = 0, n = list.length; i < n; i++) {
if (list[i] === needle) return i;
}
return -1;
};
@hgfischer
hgfischer / benchmark+go+nginx.md
Last active April 11, 2024 22:09
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
@wsargent
wsargent / docker_cheat.md
Last active August 31, 2023 12:10
Docker cheat sheet
@jcfr
jcfr / CMakeLists.txt
Last active September 7, 2021 17:54
CMake project allowing to build OpenSSL 32 and 64-bit for Windows and upload the associated "tar.gz" archives on http://packages.kitware.com
cmake_minimum_required(VERSION 2.8.10.2)
#
# This project allows to configure, build, archive and upload an OpenSSL install tree.
#
if(DEFINED UPLOAD_PACKAGE_SCRIPT)
set(MIDAS_URL "http://packages.kitware.com")
set(FOLDER_ID 203)
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@shovon
shovon / gist:5728555
Last active December 18, 2015 04:49
Pretty print git logs. Better than gitk.
# Create a git alias that will pretty-print your git logs. Much better than
# firing up `gitk`.
#
# From https://coderwall.com/p/euwpig#comment_3248
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
# And then, you should be able to view the logs like so:
git lg
@Acconut
Acconut / gist:5383324
Last active December 16, 2015 05:19
Hoodie on Windows and Linux

Hoodie on Windows and Linux

This guide will help you to use hoodie on windows and linux.

Before we start you'll need following dependencies installed:

  • node
  • npm
  • git
  • couchdb
@colindean
colindean / vagrant-scp.sh
Last active November 21, 2023 03:27
A quick way to transfer a file to the home directory on a Vagrant VM
#!/bin/sh
OPTIONS=`vagrant ssh-config | awk -v ORS=' ' '{print "-o " $1 "=" $2}'`
scp ${OPTIONS} "$@" || echo "Transfer failed. Did you use 'default:' as the target?"
@justinbmeyer
justinbmeyer / jsmem.md
Last active August 19, 2022 04:50
JS Memory

JavaScript Code

var str = "hi";

Memory allocation:

Address Value Description
...... ...
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 17, 2024 02:53
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: