Skip to content

Instantly share code, notes, and snippets.

View gaulatti's full-sized avatar

Javier Godoy Núñez gaulatti

View GitHub Profile
{
"bookmarks": {
"87.75 - WNYZ": {
"bandwidth": 200000,
"frequency": 87750000,
"mode": 1
},
"88.3 - WBGO (Jazz 88)": {
"bandwidth": 200000,
"frequency": 88300000,
const { PDFDocument, PageSizes, rgb } = require('pdf-lib');
const fs = require('fs');
const pageSize = PageSizes.Legal;
const sheetSize = PageSizes.Legal[1] / 3;
const offset = 20;
const createBox = (page) => {
page.drawRectangle({
x: offset,
y: pageSize[1] - offset - (pageSize[1] - offset * 2),
@gaulatti
gaulatti / validarRUT.html
Last active June 15, 2023 15:12
HTML5 Chilean RUT Validator
<!doctype html>
<html lang="es">
<head>
<meta charset="UTF-8">
<title>Validador de RUT HTML5</title>
</head>
<body>
<form>
<input type="text" id="rut" name="rut" required oninput="checkRut(this)" placeholder="Ingrese RUT">
<button type="submit">Validar RUT y Enviar Form</button>
@gaulatti
gaulatti / fbVideoDownloader.js
Last active January 17, 2023 14:26
Facebook Video Downloader (JS Console)
/*
* Facebook Video Downloader, Tested in Chrome / Safari
* rotvulpix - July11/2015@0918 CLST
*/
/*
* Usage: Go to video page (not modal window), and execute this code in console.
* If you want the HD Source, please see it on HD first.
*/
@gaulatti
gaulatti / cleanTwitter.js
Created October 18, 2021 16:44
Clean your twitter feed (remove accounts who haven't tweeted in more than 3 months)
import Twit from 'twit'
const config = {
consumer_key: 'something',
consumer_secret: 'something',
access_token: 'something',
access_token_secret: 'something',
}
let cursor
@gaulatti
gaulatti / visaAppointmentWaitTimes.js
Created June 22, 2020 22:20
Get all Visa Appointment Wait Times in US Consulates at once
# 1. Get into this page: https://travel.state.gov/content/travel/en/us-visas/visa-information-resources/wait-times.html
# 2. Execute the Script
# 3. Make sure all XHR requests are done
# 4. Do a console.table(items) to see the data
var items = []
var getAllData = () => {
var dataUrl = "https://travel.state.gov/content/travel/resources/database/database.getVisaWaitTimes.html";
var dataAppid = "VisaWaitTimesHomePage";
server {
server_name server.domain.com;
location / {
proxy_pass http://127.0.0.1:8080;
}
listen 80;
}
version: 0.2
phases:
pre_build:
commands:
- echo Logging in to Amazon ECR...
- $(aws ecr get-login --no-include-email --region $AWS_DEFAULT_REGION)
- docker pull $AWS_ACCOUNT_ID.dkr.ecr.$AWS_DEFAULT_REGION.amazonaws.com/$IMAGE_REPO_NAME:$IMAGE_TAG
build:
commands:
FROM ruby:2.7.0
# Install Linux Dependences
RUN apt-get update -qq && apt-get install -y build-essential default-mysql-client
# Set Environmental Variables
ENV APP_HOME /tukwila
# Set Workdir
RUN mkdir $APP_HOME
#!/bin/bash
prefix=<account>.dkr.ecr.us-west-2.amazonaws.com
region=us-west-2
case $1 in
tukwila)
repository=tukwila
tag=tukwila_i
port_inside=3000
port_outside=8080
;;