Skip to content

Instantly share code, notes, and snippets.

View vladikoff's full-sized avatar
🚀
🧇

Vlad Filippov vladikoff

🚀
🧇
View GitHub Profile
@nexpr
nexpr / common.js
Created April 11, 2020 12:50
lit-html routing example
export const navigate = url => eve => {
eve.preventDefault()
const nav_url = url || eve.target.href
history.pushState(null, "", nav_url)
window.dispatchEvent(new Event("pushstate"))
}
@ayyybe
ayyybe / ccdl.command
Last active May 2, 2024 16:08
Adobe Offline Package Builder v0.1.2 (macOS only) --- No longer being maintained.
#!/bin/bash
CYAN="$(tput bold; tput setaf 6)"
RESET="$(tput sgr0)"
clear
if command -v python3 > /dev/null 2>&1; then
if [ $(python3 -c "print('ye')") = "ye" ]; then
clear
@georgf
georgf / json-schema.json
Last active June 26, 2019 18:42
Mobile experiments kinto setup
{
"type": "object",
"required": [
"id",
"description",
"match",
"buckets",
"branches"
],
"properties": {
@thomcc
thomcc / logins-build.md
Last active September 6, 2018 20:45
Doing a local build of the logins archive

Doing a local build of the logins archive:

Note that we're working on improving this, but this is where we are currently. The first 5 steps you should only need to do once, and after that you can just run ./gradlew library:assembleRelease from the right dir (step 6).

Also note that this is somewhat sensitive to your local config, so while I've tried to test and make sure it works, well, hopefully I didn't forget any steps that I have already done in the past.

  1. Install NDK r15c from https://developer.android.com/ndk/downloads/older_releases (yes, this sucks, but newer versions don't understand the --deprecated-headers argument required to build OpenSSL against a v21 toolchain).

    • Extract it and put it somewhere we'll call $NDK_HOME.
  2. Install rustup from https://rustup.rs. You can do this while part 1 is happening.

@jvehent
jvehent / extract_apk_cert_sha256.sh
Last active June 27, 2018 19:36
Extract the SHA256 fingerprint of an APK signing cert. Run with $ ./extract_apk_cert_sha256.sh <something.apk>
#!/usr/bin/env bash
set -e
[ ! -r "$1" ] && echo "usage: $0 <apk>" && exit 1
tmpdir="$(mktemp -d)"
tmpcrt="$(mktemp)"
# unzip the apk into a temporary directory
unzip -qq "$1" -d "$tmpdir"
# extract the public cert from the pkcs7 detached signature
@xujiaao
xujiaao / android-set-ntp-server.md
Last active April 17, 2024 03:40
Set the NTP server of your android device
tags
Android
Android Things

Set the NTP server of your android device

module.exports = function(file, api) {
// Alias the jscodeshift API.
var j = api.jscodeshift;
// Parse JS code into AST.
var root = j(file.source);
root.find(j.ExpressionStatement).forEach(function(p) {
// Only change the registerSuite method.
if (p.value.expression.callee &&
p.value.expression.callee.name === "registerSuite") {
@ebidel
ebidel / feature_detect_es_modules.js
Last active September 4, 2023 13:56
Feature detect ES modules: both static import and dynamic import()
<!--
Complete feature detection for ES modules. Covers:
1. Static import: import * from './foo.js';
2. Dynamic import(): import('./foo.js').then(module => {...});
Demo: http://jsbin.com/tilisaledu/1/edit?html,output
Thanks to @_gsathya, @kevincennis, @rauschma, @malyw for the help.
-->
@peteryates
peteryates / guide.md
Last active April 11, 2024 00:57
How to stop adverts appearing on your Samsung TV

I'm getting adverts in my TV's UI, help!

Samsung's otherwise excellent 2016 range of UHD TVs received an update that added advertisements to the UI. This has been complained about at great length on Samsung's forums and repeatedly, Samsung have refused to add an option to remove them.

The ads interrupt the clean UI of the TV and are invasive. Here's an example of how they look:

one two

This guide was originally posted on Samsung's TV forums but unfortunately, that site is a super-slow and barely accessible unusable mess.

@boneskull
boneskull / README.md
Last active April 10, 2024 12:47
example of how to debug mocha v4 if hanging

Here's an example of how to debug Mocha v4 if it hangs.

Ensure you're using a Node.js 8 or newer (or any version with async_hooks support).

If you run your test, you'll notice it hangs:

$ mocha test.js