Profile | download (kb/s) | upload (kb/s) | latency (ms) |
---|---|---|---|
Native | 0 | 0 | 0 |
GPRS | 50 | 20 | 500 |
56K Dial-up | 50 | 30 | 120 |
Mobile EDGE | 240 | 200 | 840 |
2G Regular | 250 | 50 | 300 |
2G Good | 450 | 150 | 150 |
3G Slow | 780 | 330 | 200 |
This file contains hidden or 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 () { | |
'use strict'; | |
var body = document.body, | |
html = document.documentElement; | |
var docHeight = Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight); | |
var findingColor = 'limegreen'; | |
This file contains hidden or 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
#!/bin/bash | |
#: Title : ftpush | |
#: Author : Boris Diakur | |
#: Version : 1.0 | |
#: Description : Transmits all changed (tracked and uncommited) files to an ftp server via Transmits DockSend. | |
#: Options : None | |
for i in $(git status --short --untracked-files=no); do | |
if [[ -e "$i" ]]; then | |
echo "Transmitting $i" |
This file contains hidden or 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
:where(html) { | |
display: grid; | |
height: 100vh; | |
height: 100dvh; | |
} |
This file contains hidden or 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
lvh: Largest viewport height (when browser UI is hidden) | |
svh: Smallest viewport height (when browser UI is visible) | |
dvh: Dynamically changes when browser UI is shown |
This file contains hidden or 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
// prototype poisoning fix one-liner: | |
const noProto = (k, v, u) => k === '__proto__' ? u : v | |
// usage: | |
const json = '{ "a": 1, "__proto__": { "b": 2 } }' | |
const obj = JSON.parse(json, noProto) | |
console.log(obj.a) // 1 | |
console.log(obj.b) // undefined |
This file contains hidden or 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
/* Animating to default styles? You only need the "from" part of your keyframes 🚀 */ | |
keyframes scale-in { | |
from { | |
transform: scale(0); | |
} | |
} |
This file contains hidden or 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
#!/bin/sh | |
git stash | |
git checkout main | |
git fetch | |
git pull --rebase | |
for branch in $(git branch -a | sed 's/^\s*//' | sed 's/^remotes\///' | grep -v 'main$'); do | |
if [[ ! "$branch" =~ "origin/" ]]; then | |
last_commit_msg="$(git log --oneline --format=%f -1 $branch)" | |
if [[ "$(git log --oneline --format=%f | grep $last_commit_msg | wc -l)" -eq 1 ]]; then |