Skip to content

Instantly share code, notes, and snippets.

View vladikoff's full-sized avatar
🚀
🧇

Vlad Filippov vladikoff

🚀
🧇
View GitHub Profile
@newyankeecodeshop
newyankeecodeshop / ServingES6.md
Last active June 19, 2021 07:36
Serving ES6 to modern browsers

Background

Recently I noticed that Safari 10 for Mac/iOS had achieved 100% support for ES6. With that in mind, I began to look at the browser landscape and see how thorough the support in the other browsers. Also, how does that compare to Babel and its core-js runtime. According to an ES6 compatability table, Chrome, Firefox, and IE Edge have all surpassed what the Babel transpiler can generate in conjunction with runtime polyfills. The Babel/core-js combination achieves 71% support for ES6, which is quite a bit lower than the latest browsers provide.

It made me ask the question, "Do we need to run the babel es2015 preset anymore?", at least if our target audience is using Chrome, Firefox, or Safari.

It's clear that, for now, we can't create a site or application that only serves ES6. That will exclude users of Internet Explorer and various older browsers running on older iOS and Android devices. For example, Safari on iOS 9 has pretty mediocre ES6 support.

@vladikoff
vladikoff / gist:d3f5ec1f570e66fb7faff329d01012b7
Created May 1, 2017 16:15 — forked from vvenv/gist:0e11d36849db3fbf88fa64b63e121d5f
Generate an AUTHORS file based on the output of git shortlog.
#!/usr/bin/env sh
# Generate an AUTHORS file based on the output of git shortlog. It uses ABC
# order, strips out leading spaces and numbers, then filters out specific
# authors.
git shortlog -se \
| perl -spe 's/^\s+\d+\s+//' \
| sed -e '/^CommitSyncScript.*$/d' \
> AUTHORS
@Geoyi
Geoyi / install virtualenv ubuntu 16.04.md
Created September 16, 2017 12:19 — forked from frfahim/install virtualenv ubuntu 16.04.md
How to install virtual environment on ubuntu 16.04

How to install virtualenv:

Install pip first

sudo apt-get install python3-pip

Then install virtualenv using pip3

sudo pip3 install virtualenv 
@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
@peteryates
peteryates / guide.md
Last active March 6, 2025 19:18
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.

@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.
-->
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") {
@xujiaao
xujiaao / android-set-ntp-server.md
Last active May 4, 2025 12:55
Set the NTP server of your android device
tags
Android
Android Things

Set the NTP server of your android device

@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
@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.