Skip to content

Instantly share code, notes, and snippets.

View jairoFernandez's full-sized avatar
🙃
creating....

Jairo Fernández jairoFernandez

🙃
creating....
View GitHub Profile
@gtrabanco
gtrabanco / keybase-gpg.sh
Last active October 14, 2023 21:27
Import existing GPG keys from Keybase wizard and configure it for GIT
#!/usr/bin/env bash
#shellcheck disable=SC2016
set -euo pipefail
if [[ -z "${DOTLY_PATH:-}" ]] || ! output::empty_line > /dev/null 2>&1; then
red='\033[0;31m'
green='\033[0;32m'
bold_blue='\033[1m\033[34m'
normal='\033[0m'
@nicobytes
nicobytes / nest-pg.md
Last active February 18, 2022 02:59
NestJS, TypeORM and PostgreSQL
npm install --save @nestjs/typeorm typeorm pg
import { Module } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
import { AppController } from './app.controller';
import { AppService } from './app.service';
import { configService } from './config/config.service';
@bennigraf
bennigraf / Dockerrun.aws.json
Created December 11, 2019 08:02 — forked from bgraf-zlab/Dockerrun.aws.json
Use `traefic` within AWS Elasticbeanstalk Multi-Container Docker as a letsencrypt-secured load balancer & proxy to other services
{
"AWSEBDockerrunVersion": 2,
"volumes": [
{
"name": "dockersock",
"host": { "sourcePath": "/var/run/docker.sock" }
},
{
"name": "traefik-config",
"host": { "sourcePath": "/var/app/current/reverseproxyconf.yml" }
@posener
posener / go-table-driven-tests-parallel.md
Last active July 10, 2024 13:19
Be Careful with Table Driven Tests and t.Parallel()

Be Careful with Table Driven Tests and t.Parallel()

We Gophers, love table-driven-tests, it makes our unittesting structured, and makes it easy to add different test cases with ease.

Let’s create our table driven test, for convenience, I chose to use t.Log as the test function. Notice that we don't have any assertion in this test, it is not needed to for the demonstration.

func TestTLog(t *testing.T) {
	t.Parallel()
@nitsas
nitsas / set.js
Last active March 24, 2022 02:18 — forked from brettz9/set.js
Simple JS equivalent of the Python set() constructor (without the methods)
/**
* Simple JS equivalent of the Python set() constructor (without the methods)
* @requires shim: Array.prototype.indexOf
* @param {array} arr The array to turn into a set
* @example
* var mySet = set(['red', 'yellow', 'black', 'yellow']);
* mySet.length; // 3
* JSON.stringify(mySet); // ["red","yellow","black"]
* @see For a fuller version, see {@link https://npmjs.org/package/set}
*/
@parmentf
parmentf / GitCommitEmoji.md
Last active July 14, 2024 11:47
Git Commit message Emoji
@SwarmShepherd
SwarmShepherd / DartReflection
Created November 3, 2012 01:58
Example of using Reflection in Dart
#import('dart:mirrors');
class MyClass {
String _test;
String get test => _test;
set test(String paramVal) => _test = paramVal;
void my_method() {
}