Skip to content

Instantly share code, notes, and snippets.

View vanics's full-sized avatar

Icaro Pacheco vanics

View GitHub Profile
@vanics
vanics / DebuggingNodeJSHerokuApps.md
Created October 10, 2018 22:54 — forked from Choonster/DebuggingNodeJSHerokuApps.md
How to debug Node.js web applications running on Heroku using ngrok

Debugging Node.js web applications running on Heroku using ngrok

Introduction

Heroku only allows each dyno to send and receive external network traffic on a single port, which means you can't simply run node --debug server.js and attach your debugger to your-app.herokuapp.com:5858.

To work around this, you can use ngrok and Heroku ngrok Buildpack to tunnel to the debugger's port and access it externally.

@vanics
vanics / country_names_codes.js
Created March 19, 2019 21:59 — forked from rsalunga29/country_names_codes.js
Country Names and Country Codes Object
const country_names = {'Afghanistan': 'AF','Albania': 'AL','Algeria': 'DZ','American Samoa': 'AS','Andorra': 'AD','Angola': 'AO','Anguilla': 'AI','Antarctica': 'AQ',
'Antigua and Barbuda': 'AG','Argentina': 'AR','Armenia': 'AM','Aruba': 'AW','Australia': 'AU','Austria': 'AT','Azerbaijan': 'AZ','Bahamas': 'BS',
'Bahrain': 'BH','Bangladesh': 'BD','Barbados': 'BB','Belarus': 'BY','Belgium': 'BE','Belize': 'BZ','Benin': 'BJ','Bermuda': 'BM','Bhutan': 'BT',
'Bolivia, Plurinational State of': 'BO','Bonaire, Sint Eustatius and Saba': 'BQ','Bosnia and Herzegovina': 'BA','Botswana': 'BW','Bouvet Island': 'BV',
'Brazil': 'BR','British Indian Ocean Territory': 'IO','Brunei Darussalam': 'BN','Bulgaria': 'BG','Burkina Faso': 'BF','Burundi': 'BI','Cambodia': 'KH',
'Cameroon': 'CM','Canada': 'CA','Cape Verde': 'CV','Cayman Islands': 'KY','Central African Republic': 'CF','Chad': 'TD','Chile': 'CL','China': 'CN',
'Christmas Island': 'CX','Cocos (Keeling) Islands': 'CC','Colombia': 'CO','Comoros': 'KM','Congo': 'CG','Congo, th
On OSX Yosemite and above, in a terminal window:
1. Switch to the root user.
$ sudo su -
2. Create a Dummynet pipe that represents a slow, unreliable network:
# dnctl pipe 1 config bw 10Kbit/s delay 300 plr 0.1 noerror
@vanics
vanics / tools.md
Created November 23, 2019 21:17 — forked from mefellows/tools.md
Networking Tools - Cheat Sheet

*nix Networking Tools Cheat Sheet

## Network Performance

iperf (all)

Setup the server:

iperf -s
@vanics
vanics / cryptography-file-formats.md
Created December 8, 2022 03:01 — forked from tuansoibk/cryptography-file-formats.md
Cryptography material conversion and verification commands
  1. Introduction
  2. Standards
  3. Common combinations
  4. Conversion
  5. Verification/Inspection
  6. Tips for recognising

Introduction

It happens that there are many standards for storing cryptography materials (key, certificate, ...) and it isn't always obvious to know which standard is used by just looking at file name extension or file content. There are bunch of questions on stackoverflow asking about how to convert from PEM to PKCS#8 or PKCS#12, while many tried to answer the questions, those answers may not help because the correct answer depends on the content inside the PEM file. That is, a PEM file can contain many different things, such as an X509 certificate, a PKCS#1 or PKCS#8 private key. The worst-case scenario is that someone just store a non-PEM content in "something.pem" file.