Skip to content

Instantly share code, notes, and snippets.

View u3u's full-sized avatar
😅
Fuck Safari! Safari must go die

u3u

😅
Fuck Safari! Safari must go die
View GitHub Profile
TypeScript 31 hrs 2 mins █████████████████▉░░░ 85.2%
Other 3 hrs 4 mins █▊░░░░░░░░░░░░░░░░░░░ 8.4%
JavaScript 1 hr 49 mins █░░░░░░░░░░░░░░░░░░░░ 5.0%
SCSS 16 mins ▏░░░░░░░░░░░░░░░░░░░░ 0.7%
JSON 10 mins ░░░░░░░░░░░░░░░░░░░░░ 0.5%
@u3u
u3u / cssText.js
Last active April 10, 2020 07:58
Fix safari 13.1 getComputedStyle `cssText` missing `transform-origin`
export default function cssText(el) {
const style = window.getComputedStyle(el);
const transformOrigin = ` transform-origin: ${style.transformOrigin};`;
return style.cssText + transformOrigin;
}
@u3u
u3u / fuck-macos-usb-drive.sh
Created July 19, 2019 14:30
🤬Fuck MacOS USB Drive!!!!!!!!!!!!!!!!!!!!!!!!!
sudo killall -STOP -c usbd
@u3u
u3u / restore.sh
Created September 26, 2018 05:49
macOS Mojave: font rendering is blurry or has changed
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
@u3u
u3u / fish_title.fish
Last active February 24, 2018 07:52
~/.config/fish/functions/fish_title.fish
function fish_title -d 'Use PROCESS $PWD format, replacing /Users/username with ~'
set realhome ~
if test "$_" != "fish"
echo $_ ''
else
echo ''
end
string replace -r '^'"$realhome"'($|/)' '~$1' $PWD
end
@u3u
u3u / 1px.scss
Last active October 26, 2017 14:20
Retina 屏 1px 解决方案
/*
* Tencent is pleased to support the open source community by making WeUI available.
*
* Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved.
*
* Licensed under the MIT License (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://opensource.org/licenses/MIT
*