Skip to content

Instantly share code, notes, and snippets.

View ronnycoding's full-sized avatar
🇻🇪
The only way to do great work is to love what you do.

Ronny Freites ronnycoding

🇻🇪
The only way to do great work is to love what you do.
View GitHub Profile
@akellbl4
akellbl4 / auth-wrapper.js
Last active May 20, 2023 13:45
Code example for the article: "Why I got rid of getInitialProps on my work Next.js project"
export function authWrapper(next) {
return async function auth(ctx) {
const user = await session.getUser();
if (!user) {
return {
redirect: {
destination: '/sign-in',
permanent: false,
},
@Glyphack
Glyphack / graphql_test_utils.py
Created August 23, 2019 14:18
functions to test graphql api with python
from django.contrib.auth.models import AnonymousUser
from django.test import RequestFactory
from snapshottest.django import TestCase
from graphene.test import Client
from hackernews.schema import schema
class APITestCase(TestCase):
def setUp(self):
@bradtraversy
bradtraversy / vscode_shortcuts.md
Last active May 6, 2024 12:38
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

If you have any other helpful shortcuts, feel free to add in the comments of this gist :)

Official List of all commands

@qoomon
qoomon / conventional_commit_messages.md
Last active May 7, 2024 19:27
Conventional Commit Messages

Conventional Commit Messages

See how a minor change to your commit message style can make a difference.

Tip

Have a look at git-conventional-commits , a CLI util to ensure these conventions and generate verion and changelogs

Commit Message Formats

Default

@gaboesquivel
gaboesquivel / aplicaciones-eos.md
Last active January 19, 2020 05:01
Guía para el webinar de desarrollo de aplicaciones sobre la plataforma EOS.

Introducción al desarrollo de aplicaciones en EOS

Alt text

Descripción del Webinar

Es una gentil introducción a la programación de aplicaciones en eosio blockchains dirigida a desarrolladores de software.

  • No es indispensable conocer c++, sin embargo conocimientos de programación son requiridos para comprender los contenidos de este webinar.
  • Haremos un recorrido general por el diseño, historia y ecosistema de eosio.
@sergmetelin
sergmetelin / hackathon_how_to.md
Last active July 21, 2020 04:03
Hackathon Getting Started guide

About EOSIO

The EOS.IO software introduces a new blockchain architecture designed to enable vertical and horizontal scaling of decentralized applications. This is achieved by creating an operating system-like construct upon which applications can be built. The software provides accounts, authentication, databases, asynchronous communication and the scheduling of applications across many CPU cores or clusters. The resulting technology is a blockchain architecture that may ultimately scale to millions of transactions per second, eliminates user fees, and allows for quick and easy deployment and maintenance of decentralized applications, in the context of a governed blockchain.

About this guide:

Full documentation can be found at https://developers.eos.io/

This means your portal is correctly setup for the hackathon.

<?xml version="1.0" encoding="UTF-8"?>
<FacturaElectronica xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://tribunet.hacienda.go.cr/docs/esquemas/2017/v4.2/facturaElectronica">
<Clave>50609011800011717071900000000000000000034987656238</Clave>
<NumeroConsecutivo>00000000000000000032</NumeroConsecutivo>
<FechaEmision>2018-01-08T20:25:49.049Z</FechaEmision>
<Emisor>
<Nombre>Alvaro Andres Zuniga Hernandez</Nombre>
<Identificacion>
<Tipo>01</Tipo>
<Numero>117170719</Numero>
const fs = require("fs");
const WebCrypto = require("node-webcrypto-ossl");
const xadesjs = require("xadesjs");
const { XMLSerializer } = require("xmldom-alpha");
const crypto = new WebCrypto();
xadesjs.Application.setEngine("OpenSSL", crypto);
function preparePem(pem) {
return pem
@eduwass
eduwass / docker-compose.yml
Last active December 31, 2023 00:31
Mailhog + WordPress in docker-compose.yml
version: '3'
services:
db:
image: mysql:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: somewordpress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]