Skip to content

Instantly share code, notes, and snippets.

View izinin's full-sized avatar

Igor Zinin izinin

View GitHub Profile
@stevenharman
stevenharman / burger-king.md
Last active February 28, 2018 12:46
Setting up a new Rails app, with thoughtbot/suspenders, and my own preferences.

A new Rails app

It goes a little something like this:

  1. rails new APP_NAME --database=postgresql --skip-test-unit
  2. suspenders APP_NAME --skip-git true --skip-keeps true --force

Then comes a whole bunch of customizing for my likes:

  1. unicorn -> puma
@denji
denji / golang-tls.md
Last active May 14, 2025 16:19 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@azenla
azenla / structures.dart
Created January 29, 2015 14:24
Data Structures in Dart
import "dart:collection";
class Tuple<A, B> {
A a;
B b;
Tuple(this.a, this.b);
}
void main() {
@martynjarvis
martynjarvis / perforce.md
Last active December 4, 2019 10:55
Perforce Cheatsheet

Perforce Cheatsheet

Useful Commands:

Check I have no changes:

p4 opened

Sync to head:

@lenciel
lenciel / Useful netcat examples on Linux.md
Last active February 16, 2024 04:12
Useful netcat examples on Linux

Often referred to as the "swiss army of knife" for TCP/IP networking, [Netcat][1] is an extremely versatile Linux utility that allows you to do anything under the sun using TCP/UDP sockets. It is one of the most favorite tools for system admins when they need to do networking related troubleshooting and experimentation.

In this tutorial, I am sharing a few useful netcat examples, although the sky is the limit when it comes to possible netcat use cases. If you are using netcat regularly, feel free to share your use case.

Note that when you are binding to well-known ports (0-1023) with nc, you need root privilege. Otherwise, run nc as a normal user.

1. Test if a particular TCP port of a remote host is open.

$ nc -vn 192.168.233.208 5000
@jo
jo / js-crypto-libraries.md
Last active May 21, 2025 02:55
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

@denji
denji / http-benchmark.md
Last active May 15, 2025 12:21
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@vincentbernat
vincentbernat / elasticsearch.erl
Created November 30, 2013 07:50
Erlang module for Tsung to extract data from large files
-module(elasticsearch).
-export([autocomplete/1, autocomplete/0,
search/1, search/0,
start/0,
stop/0,
loop/1]).
-on_load(start/0).
%% Return an autocomplete request
autocomplete() ->
@Stanback
Stanback / nginx.conf
Last active March 30, 2025 03:57 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which
@stevenyap
stevenyap / Rake Database.md
Last active August 4, 2024 18:45
List of rake commands to manage database

Create database

rake db:create

Create database table

This will creates a migration file in /db/migrate without table definition.

rails g migration create_<TABLE>