Skip to content

Instantly share code, notes, and snippets.

@NickCis
NickCis / Makefile
Created November 24, 2023 14:56
Extraer link de iframe de https://www.mega.cl/senal-en-vivo/
SHELL := /usr/bin/bash
.PHONY: activate clean format run help
help: # Show help for each of the Makefile recipes.
@grep -E '^[a-zA-Z0-9 -]+:.*#' Makefile | sort | while read -r l; do printf "\033[1;32m$$(echo $$l | cut -f 1 -d':')\033[00m:$$(echo $$l | cut -f 2- -d'#')\n"; done
venv: requirements.txt # Crea carpeta venv
python3 -m venv venv
source ./venv/bin/activate && \
@NickCis
NickCis / spec.json
Created January 18, 2023 21:12 — forked from stewartmcgown/spec.json
Google Web SMS Private API
This file has been truncated, but you can view the full file.
{
"version_module": true,
"title": "Instant Messaging Private API",
"ownerName": "Google",
"basePath": "",
"version": "v1",
"resources": {
"group": {
"methods": {
"kickgroupusers": {
#! /usr/bin/bash
## This script replaces time entries in am/pm format to 24hs
## $ echo "The event starts at 03:25pm and 11:11AM" | ./ampm-to-24
## The event starts at 15:25 and 11:11
# Match time entries: 03:25pm 11:11AM
regex='(0[0-9]|1[0-2]):([0-5][0-9])(AM|PM|am|pm)'
# Read STDIN line by line
// Descargar: https://github.com/alvarezgarcia/provincias-argentinas-geojson
const fetch = require('node-fetch');
const fs = require('fs').promises;
async function main() {
const geojson = {
type: 'FeatureCollection',
features: [],
};
@NickCis
NickCis / README.md
Last active October 10, 2024 14:32
Calendar Events: creating calendar events from gmail notifications e-mails.

Calendar Google APP script

La idea de este script es crear eventos del calendario como recordatorios para pagar servicios.

Necesita crear reglas en GMail para que le agregue la etiqueta calendar-event a los mails de notificaciones. El script le removerá dicha etiqueta a los mails que ya procesó.

@NickCis
NickCis / example.test.js
Created February 3, 2019 22:54
Example of jest test with custom arguments
const config = JSON.parse(process.env.__CONFIGURATION);
it('example', () => {
expect(config.custom).toEqual('command');
});
'use strict';
const config = {
custom: 'command',
flag: false,
};
const argv = process.argv.slice(0, 2);
// Naive argv parsing
process.argv
@NickCis
NickCis / runner.js
Created February 3, 2019 20:51
Jest custom command line arguments
'use strict';
const config = {
custom: 'command',
flag: false,
};
const argv = process.argv.slice(0, 2);
// Naive argv parsing
process.argv
@NickCis
NickCis / AddIdentPlugin.js
Last active October 26, 2021 14:56
Webpack - themes processing (multi import)
'use strict';
let refCounter = 0;
/** This plugin adds the options of the provided loaders to Webpack's RuleSet reference.
* This allows you to refer to this config by an `ident` name and avoid the options serialization.
*
* The simpler use case is forcing a loader by using a require query string, if the needed configuration has
* functions or not serializable objects, you'll have to use this `ident` plugin.
*
* If the provided loaders options do not have an `ident` property, one is generated.
@NickCis
NickCis / export-ble-infos.py
Created January 13, 2018 21:11 — forked from Mygod/export-ble-infos.py
Export your Windows Bluetooth LE keys into Linux!
#!/usr/bin/python3
"""
Export your Windows Bluetooth LE keys into Linux!
Thanks to: http://console.systems/2014/09/how-to-pair-low-energy-le-bluetooth.html
Usage:
$ ./export-ble-infos.py <args>
$ sudo bash -c 'cp -r ./bluetooth /var/lib && service bluetooth force-reload'