Skip to content

Instantly share code, notes, and snippets.

View paulodutra's full-sized avatar

Paulo Dutra paulodutra

View GitHub Profile
@rakibulalam
rakibulalam / BFSShortestReachInAgraph.js
Last active May 28, 2022 21:47
BFS: Shortest Reach in a Graph Hacker Rank
class Node {
constructor(value) {
this.value = 0;
this.label = 0;
this.distance = -1;
this.visited = false;
this.edges = [];
}
addEdge(node) {
this.edges.push(node);
@wesleywillians
wesleywillians / download-composer
Created June 20, 2019 01:13
Nginx.conf e Linha para baixar o composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
@reillysiemens
reillysiemens / signing-vbox-kernel-modules.md
Last active July 4, 2024 07:20
Signing VirtualBox Kernel Modules

Signing VirtualBox Kernel Modules

These are the steps I followed enable VirtualBox on my laptop without disabling UEFI Secure Boot. They're nearly identical to the process described on [Øyvind Stegard's blog][blog], save for a few key details. The images here are borrowed from the [Systemtap UEFI Secure Boot Wiki][systemtap].

  1. Install the VirtualBox package (this might be different for your platform).
    src='https://download.virtualbox.org/virtualbox/rpm/fedora/virtualbox.repo'
@fgilio
fgilio / axios-catch-error.js
Last active April 11, 2024 19:02
Catch request errors with Axios
/*
* Handling Errors using async/await
* Has to be used inside an async function
*/
try {
const response = await axios.get('https://your.site/api/v1/bla/ble/bli');
// Success 🎉
console.log(response);
} catch (error) {
// Error 😨
@burck1
burck1 / OpenamRESTapi
Last active November 20, 2022 12:24
OpenAM REST api summary
Ref: http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#chap-rest
Authentication - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-auth-json
Token Validation - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-token-validation
User Self Registration - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-self-registration
Reseting Forgotten Passwords - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-password-reset
Identity Management - http://openam.forgerock.org/openam-documentation/openam-doc-source/doc/dev-guide/index/chap-rest.html#rest-api-crud-identity
Login v1:
@leocomelli
leocomelli / git.md
Last active July 23, 2024 12:33
Lista de comandos úteis do GIT

GIT

Estados

  • Modificado (modified);
  • Preparado (staged/index)
  • Consolidado (comitted);

Ajuda