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.
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)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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>:* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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] | |
} |
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 - $@ <$input_file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!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 |
NewerOlder