Skip to content

Instantly share code, notes, and snippets.

View joaomlneto's full-sized avatar

João Neto joaomlneto

View GitHub Profile
@DavidWells
DavidWells / tiny-markdown-text.md
Last active May 20, 2024 11:08
Tiny tiny markdown text

How to make tiny text in markdown

Normal text here. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer vitae mauris arcu, eu pretium nisi. Vivamus vitae mi ligula, non hendrerit urna. Suspendisse potenti. Quisque eget massa a massa semper mollis.

Tiny text is here. Awwwww its so cuteeeeeeeeeee

Normal big text

@fnky
fnky / stripe-keys-and-ids.tsv
Last active May 29, 2024 20:12
Stripe keys and IDs
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
@youmych
youmych / how-to-install-latest-gcc-on-linux-mint.txt
Last active July 20, 2020 21:10 — forked from application2000/how-to-install-latest-gcc-on-ubuntu-lts.txt
How to install latest gcc on Linux Mint 18 (18.3)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 and https://askubuntu.com/questions/26498/choose-gcc-and-g-version
To install gcc-7 (gcc-7.2.0), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@mkagenius
mkagenius / output when compiled using g++ and ran like . slash a.out
Last active January 5, 2018 15:52
Spectre.pdf illustrated c++ code verbatim
root@ubuntu:~# ./a.out
Reading 40 bytes:
Reading at malicious_x = 0xffffffffffdfeba8... Unclear: 0x54='T' score=980 (second best: 0x02 score=706)
Reading at malicious_x = 0xffffffffffdfeba9... Unclear: 0x68='h' score=929 (second best: 0x02 score=709)
Reading at malicious_x = 0xffffffffffdfebaa... Unclear: 0x65='e' score=973 (second best: 0x02 score=786)
Reading at malicious_x = 0xffffffffffdfebab... Unclear: 0x20=' ' score=928 (second best: 0x02 score=784)
Reading at malicious_x = 0xffffffffffdfebac... Unclear: 0x4D='M' score=746 (second best: 0x02 score=730)
Reading at malicious_x = 0xffffffffffdfebad... Unclear: 0x61='a' score=978 (second best: 0x02 score=749)
Reading at malicious_x = 0xffffffffffdfebae... Success: 0x67='g' score=39 (second best: 0x02 score=17)
Reading at malicious_x = 0xffffffffffdfebaf... Unclear: 0x69='i' score=972 (second best: 0x02 score=748)
@aperezdc
aperezdc / unwindtest.c
Created October 17, 2017 15:18
Example on how to dump stack trace on SIGUSR2, useful if program gets stuck
/*
* unwindtest.c
* Copyright (C) 2017 Adrian Perez <aperez@igalia.com>
*
* Distributed under terms of the MIT license.
*/
#define _GNU_SOURCE
#include <ucontext.h>
#include <dlfcn.h>
@max-mapper
max-mapper / bibtex.png
Last active March 10, 2024 21:53
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@btfak
btfak / useHexo.md
Created May 26, 2016 09:41
How to use Hexo and deploy to GitHub Pages
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active May 23, 2024 07:53
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@max-mapper
max-mapper / 0.md
Last active February 25, 2024 12:24
JS hoisting by example

JavaScript function hoisting by example

Below are many examples of function hoisting behavior in JavaScript. Ones marked as works successfuly print 'hi!' without errors.

To play around with these examples (recommended) clone them with git and execute them with e.g. node a.js

Notes on hoisting

(I may be using incorrect terms below, please forgive me)

@psayre23
psayre23 / gist:c30a821239f4818b0709
Last active June 8, 2024 19:07
Runtime Complexity of Java Collections
Below are the Big O performance of common functions of different Java Collections.
List | Add | Remove | Get | Contains | Next | Data Structure
---------------------|------|--------|------|----------|------|---------------
ArrayList | O(1) | O(n) | O(1) | O(n) | O(1) | Array
LinkedList | O(1) | O(1) | O(n) | O(n) | O(1) | Linked List
CopyOnWriteArrayList | O(n) | O(n) | O(1) | O(n) | O(1) | Array