Skip to content

Instantly share code, notes, and snippets.

Avatar

u3u

View GitHub Profile
@u3u
u3u / cssText.js
Last active Apr 10, 2020
Fix safari 13.1 getComputedStyle `cssText` missing `transform-origin`
View cssText.js
export default function cssText(el) {
const style = window.getComputedStyle(el);
const transformOrigin = ` transform-origin: ${style.transformOrigin};`;
return style.cssText + transformOrigin;
}
View 📊 Weekly development breakdown
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 / fuck-macos-usb-drive.sh
Created Jul 19, 2019
🤬Fuck MacOS USB Drive!!!!!!!!!!!!!!!!!!!!!!!!!
View fuck-macos-usb-drive.sh
sudo killall -STOP -c usbd
@u3u
u3u / restore.sh
Created Sep 26, 2018
macOS Mojave: font rendering is blurry or has changed
View restore.sh
defaults write -g CGFontRenderingFontSmoothingDisabled -bool NO
@u3u
u3u / fish_title.fish
Last active Feb 24, 2018
~/.config/fish/functions/fish_title.fish
View 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 Oct 26, 2017
Retina 屏 1px 解决方案
View 1px.scss
/*
* 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
*