Skip to content

Instantly share code, notes, and snippets.

wget https://blakadder.com/assets/files/ultra-small-launcher.apk
adb install ultra-small-launcher.apk
# Simulate a Home key press.
adb shell input keyevent 3

/vendor/bin/siliconlabs_host/zgateway /system/bin/rootsudaemon.sh

@maccyber
maccyber / _TZE200_3towulqd.json
Last active February 9, 2024 00:54
Datapoints from tuya cloud for zigbee device: _TZE200_3towulqd (product id: TS0601)
{
"manufacturerName": [
"_TZE200_3towulqd"
],
"productId": [
"TS0601"
],
"datapoints": [
{
"name": "PIR state",
import http from 'http'
import {readFile, stat, unlink} from 'fs/promises'
import {createWriteStream} from 'fs'
const fileContent = await readFile('./list', 'utf-8')
const listOfUrls = fileContent
.split(/\r?\n/)
.filter((line) => line)
listOfUrls.forEach(downloadFile)
@maccyber
maccyber / cm0102.md
Last active November 21, 2021 00:23

Tactics

In order to be successful in this game, you do not need a killer tactic like Iodine or DWS. All you need is take into consideration a few things about the match engine in general and apply a few simple things to wibwob screens.

  1. You need a narrow formation without wingers.
  2. Use 2 or 4 defenders.
  3. Use one or more DMCs (it's the most overpowered position in CM 01/02)
  4. Use 1 or 3 strikers
const pluralize = (str, n) => str + (n !== 1 ? 's' : '')
const bottleText = n => `${n || 'No more'} ${pluralize('bottle', n)}`
function sing (start = 99, stop = 0) {
const [currentBottles, remainingBottles] = [bottleText(start), bottleText(start - 1)]
console.log(`${currentBottles} of beer on the wall, ${currentBottles.toLowerCase()} of beer.`)
if (!start) {
return console.log('Go to the store and buy some more, 99 bottles of beer on the wall')
#!/bin/bash
FILE="/tmp/leaf.cache"
USERNAME=myleaf@leaf.com
PASSWORD=mypassword
update_status() {
result=`leaf-connect-cli cachedStatus -u $USERNAME -p $PASSWORD -r NE`
BATTERY_STATUS=`echo ${result} | jq '.BatteryStatusRecords.BatteryStatus.SOC.Value' | sed 's/"//g'`
CHARGING_STATUS=`echo ${result} | jq '.BatteryStatusRecords.BatteryStatus.BatteryChargingStatus' | sed 's/"//g'`
{
"accessors": [
{
"bufferView": 2,
"componentType": 5126,
"count": 36,
"max": [
0.035131800919771194,
-0.59078401327133179,
0.15331600606441498
@maccyber
maccyber / eliteserien-tabell-api.js
Last active June 29, 2020 21:10
Fugly kode som henter eliteserietabellen fra NRK
const fetch = require('node-fetch')
const URL = 'https://sportsresultater.nrk.no/kasparov.api/idretter/501/turneringer/3006/sesonger/199399/konkurranser/314629/tabell'
const reformatTable = ({ lag, _embedded: { tabell } }) => (
tabell.map(({ celler }) => {
const { tekst: posisjon, indeks: index } = celler.find(({ type }) => type === 'posisjon')
const { id } = celler.find(({ type }) => type === 'lookup')
const { tekst: formkurve } = celler.find(({ type }) => type === 'formkurve')
const { navn, kortnavn, hashtag } = lag[id]
return {
@maccyber
maccyber / no-domains-zeit-nameserver.md
Last active October 21, 2018 18:53
no-domains-zeit-nameserver.md

.no domains with zeit nameservers

Howto configure .no domains with zeit's nameservers on domeneshop.

One

now domains add example.no --force

Two

Dataset

Johnson's IPIP-NEO 120 data repository

https://osf.io/tbmh5/

Age

Divide into Eight age groups

  • 16 - 19