Skip to content

Instantly share code, notes, and snippets.

View importnil's full-sized avatar
💭
Respect the Past, Create the New

Vadim Ermolin importnil

💭
Respect the Past, Create the New
View GitHub Profile
@levi-nz
levi-nz / encrypt.js
Created July 17, 2023 08:22
Adyen 4.5.0 encryption
/*
* Adyen 4.5.0 encryption by github.com/levi-nz
*
* This code is a rough implementation and can be improved in some places.
* Read comments throughout the code for more information.
*/
const jose = require('node-jose');
// Parse the key from the string found in securedFields.html ("10001|...")
@fnky
fnky / ANSI.md
Last active June 30, 2024 13:35
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@paolocarrasco
paolocarrasco / README.md
Last active June 28, 2024 23:01
How to understand the `gpg failed to sign the data` problem in git

Problem

You have installed GPG, then tried to commit and suddenly you see this error message after it:

error: gpg failed to sign the data
fatal: failed to write commit object

Debug

Please use this guide instead, this one was written in a hurry and I forgot I had the older one.

~~Basically, you'll want to start with the MCP 1.12 release (temporarily at http://www.modcoderpack.com/files/mcp940.zip ), and then modify it to work with 1.12.2. This is actually quite simple. First, you need to edit conf/version.cfg and set both versions to 1.12.2. That on its own is not enough, but it's a critical step. Then you need to grab new SRG mappings. Normally you'd get that through the !srg command, but MCPBot doesn't have it for some versions. Instead, you can get it through forge's maven. (normally it's also on the export site but not for 1.12.2). The link is http://files.minecraftforge.net/maven/de/oceanlabs/mcp/mcp/1.12.2/mcp-1.12.2-srg.zip . To set that up, first delete the conf/patches folder (otherwise patches will be merged, breaking things), and then unzip the contents of that ZIP into conf, overwriting files as pr

@gavinhungry
gavinhungry / nginx-tls.conf
Last active March 11, 2024 14:51
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are not included here.
#
# Additional tips:
#
@msoap
msoap / Raspberry Pi httpd benchmark.md
Last active September 26, 2018 16:09
Raspberry Pi httpd benchmark with wrk

Raspberry Pi httpd benchmark

Total RPS

All:

               Go/fasthttp (10 thr): 930.0 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

Nginx (10 thr): 826.1 ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

@bMinaise
bMinaise / Boilerplate CSS Media Queries
Created September 5, 2013 18:17
CSS Media Queries Boilerplate
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-width : 320px)
and (max-width : 480px) {
/* Styles */
}
/* Smartphones (landscape) ----------- */
@media only screen
and (min-width : 321px) {