Skip to content

Instantly share code, notes, and snippets.

View lopezjurip's full-sized avatar
馃幆
Focusing

Patricio L贸pez Juri lopezjurip

馃幆
Focusing
View GitHub Profile
@khalidx
khalidx / node-typescript-esm.md
Last active April 15, 2025 14:15
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!

package.json

@Miserlou
Miserlou / shell_invoke.sh
Created August 31, 2017 20:00
Execute Lambda Shell Commands With Zappa
zappa invoke --raw 'import subprocess; print subprocess.check_output("ls");'
@princejwesley
princejwesley / await-babel-repl.js
Last active January 9, 2021 09:20
REPL with standalone await + babel transform
const repl = require('repl');
const babel = require('babel-core');
function preprocess(input) {
const awaitMatcher = /^(?:\s*(?:(?:let|var|const)\s)?\s*([^=]+)=\s*|^\s*)(await\s[\s\S]*)/;
const asyncWrapper = (code, binder) => {
let assign = binder ? `global.${binder} = ` : '';
return `(function(){ async function _wrap() { return ${assign}${code} } return _wrap();})()`;
};
@radutzan
radutzan / Transantiago public endpoints.md
Last active October 13, 2023 03:31
APIs REST p煤blicas con data del Transantiago. Respuestas en JSON.

Nuevo: SCLTransit

Ignacio Hermosilla implement贸 un servicio web de acceso p煤blico usando los feeds GTFS de Transantiago y los puntos de acceso oficiales que normalmente requieren acuerdos con el DTPM, para que t煤 no tengas que hacerlo.

Est谩 toda la informaci贸n de Transantiago que puedas necesitar, con formatos de alta calidad y sin tr谩mites. Estas APIs son las que ahora alimentan a Cromi.

APIs internas de Transantiago (no recomendadas)

Transantiago implement贸 estas APIs para uso interno, por lo que no hay ninguna garant铆a sobre su funcionalidad, mantenimiento o futura existencia. 脷salas bajo tu propio riesgo. (Probablemente no es aconsejable que las uses para nada cr铆tico.)

Minimum Viable Async with Node 6

With the release of Node 6.0.0, the surface of code that needs transpilation to use ES6 features has been reduced very dramatically.

This is what my current workflow looks like to set up a minimalistic and fast microservice using micro and async + await.

The promise

@vasanthk
vasanthk / System Design.md
Last active April 24, 2025 13:48
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
anonymous
anonymous / Cascading-Solar-System!.markdown
Created April 26, 2015 12:19
Cascading Solar System!

Cascading Solar System!

An Orrery in pure CSS3 (ok, Sass generated). Still WIP. Having great fun with it!

A Pen by Tady Walsh on CodePen.

License.

@Timber232
Timber232 / stickynote_font_fix.reg
Created April 21, 2015 14:12
Change font to consola (Windows Sticky Notes)
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts]
"Segoe Print (TrueType)"="consola.ttf"
"Segoe Print Bold (TrueType)"="consolab.ttf"
anonymous
anonymous / gist:3bc472ad0f9631025dce
Created March 26, 2015 03:14
bajador de carpetas siding
import cookielib
import os
import urllib
import urllib2
from bs4 import BeautifulSoup
import re
# Datos de la cuenta de siding
username = "<username>"
@StephanHoyer
StephanHoyer / github.js
Last active February 13, 2024 14:19
Commiting multiple files to github over API
'use strict';
var Octokat = require('octokat');
var extend = require('lodash/object/assign');
var defaults = {
branchName: 'master',
token: '',
username: '',
reponame: ''