Skip to content

Instantly share code, notes, and snippets.

View jsanta's full-sized avatar

Jose Ignacio Santa Cruz G. jsanta

View GitHub Profile
@fernospam
fernospam / Amazfit Bip-U.md
Last active June 11, 2024 10:32
How to create watch faces for Amazfit Bip U (also GTR and GTS)

Creación de Esferas para Amazfit Bip U (también GTR y GTS)

A continuación se relata lo mínimo necesario que hay que saber para crear esferas para varios relojes Amazfit. La explicación esta especialmente indicada para el modelo Bip-U, del cual apenas hay nada en internet, pero la mayoría de pasos son aplicables a otros modelos como GTS y GTR en sus distintas variedades, pues se utilizan las mismas herramientas.

Acceso a la app de creación de la esfera

Las esferas de varios modelos de Amazfit utilizan la app para este propósito que se encuentra en la web de Huami (los relojes Xiaomi, Amazfit y Zepp los fabrica Huami).

Primero hay que darse de alta en Huami como developer (descripción en https://amazfitwatchfaces.com/forum/viewtopic.php?t=2090)

@Arty2
Arty2 / fixedsearch.js
Last active June 23, 2024 15:45 — forked from cmod/hugofastsearch.md
Super fast, client side search for Hugo.io with Fusejs.io
// static/scripts/fixedsearch/fixedsearch.js
/*--------------------------------------------------------------
fixedsearch — Super fast, client side search for Hugo.io with Fusejs.io
based on https://gist.github.com/cmod/5410eae147e4318164258742dd053993
--------------------------------------------------------------*/
if (typeof variable !== 'undefined') {
console.log('fixedsearch.js already loaded');
} else {
fixedsearch = function(){
@rami-alloush
rami-alloush / mask.directive.ts.md
Last active July 30, 2024 11:13 — forked from gund/mask.md
Simple Angular mask directive

Simple Angular mask directive

This directive does not create it's own value accessor - it simply reuses whatever element is using already and just hooks in.

Also it is fully abstracted off of the HTML implementation and so can be safely used in WebWorker and server side environment.

Usage

@rbreaves
rbreaves / hwdb udev keyboard.sh
Last active January 31, 2023 21:02
hwdb udev Keyboard remap
# Original reference https://yulistic.gitlab.io/2017/12/linux-keymapping-with-udev-hwdb/
systemd --version | head -n1 | awk '{print $2}'
# note systemd versions below 220 need
# keyboard:usb:v*p*
# 220 and above
# evdev:name:<name>:*
import { ComponentFactoryResolver, ComponentRef, Directive, EventEmitter, Input, Type, ViewContainerRef } from '@angular/core';
import { Subscription } from 'rxjs';
@Directive({
selector: '[lazyComp]'
})
export class LazyCompDirective {
private _inputs;
private _outputs;
private subscription = new Subscription();
@thepeoplesbourgeois
thepeoplesbourgeois / allEventListeners.js
Last active September 1, 2023 02:18 — forked from tkafka/listAllEventListeners.js
List all event listeners in a document
function allEventListeners(){
const eventNames = Object.keys(window).filter(key => /^on/.test(key))
return [...document.querySelectorAll('*'), document].flatMap((node) => eventNames
.filter(event => node[event])
.map(event => {
return {
node,
event,
listener: (typeof node[event] === 'function') ? node[event].toString() : node[event]
}
@WebReflection
WebReflection / executable-standalone-module.md
Last active March 4, 2024 20:55
NodeJS Executable Standalone Module

Update

If you're OK in having a node-esm executable, please consider this solution.

#!/usr/bin/env sh
# the /usr/local/bin/node-esm executable
input_file=$1
shift
exec node --input-type=module - $@ &lt;$input_file
@gianpaj
gianpaj / extractCSS.js
Created March 25, 2019 09:52
Extract used CSS from a page
# Extract used CSS from a page
# https://stackoverflow.com/a/55334749/728287
#
# $ node extractCSS.js ~/Desktop/Coverage-20190325T110812.json
const fs = require('fs');
let final_css_bytes = '';
let total_bytes = 0;
let used_bytes = 0;
#!bash
#
# git-flow-completion
# ===================
#
# Bash completion support for [git-flow](http://github.com/nvie/gitflow)
#
# The contained completion routines provide support for completing:
#
# * git-flow init and version