-
When writing a string of multiple utility classes, always do so in an order with meaning. The "Concentric CSS" approach works well with utility classes (i.e,. 1. positioning/visibility 2. box model 3. borders 4. backgrounds 5. typography 6. other visual adjustments). Once you establish a familiar pattern of ordering, parsing through long strings of utility classes will become much, much faster so a little more effort up front goes a long way!
-
Always use fewer utility classes when possible. For example, use
mx-2
instead ofml-2 mr-2
and don't be afraid to use the simplerp-4 lg:pt-8
instead of the longer, more complicatedpt-4 lg:pt-8 pr-4 pb-4 pl-4
. -
Prefix all utility classes that will only apply at a certain breakpoint with that breakpoint's prefix. For example, use
block lg:flex lg:flex-col lg:justify-center
instead ofblock lg:flex flex-col justify-center
to make it very clear that the flexbox utilities are only applicable at the
by Tatiana Mac
Last updated 14 April 2021
As speaking comes with immense privilege, I have crafted a speaker rider to set expectations and boundaries around my engagement. I am grateful to all the conference organisers who have brilliantly hosted me. I would love to continue to exercise this privilege to speak at conferences, and use this privilege to make the landscape more accessible and beneficial to tech's most historically excluded and marginalised communities.
😫 I provide a lot of explanations for those of you who never had to consider these things. Most thoughtful conferences I've attended check most of these boxes intrinsically, particularly when conference runners are experienced speakers. They get it.
sudo apt-get update | |
sudo apt-get install libjemalloc-dev | |
RUBY_CONFIGURE_OPTS='--with-jemalloc' rbenv install 2.6.3 | |
# test (look for jemalloc warnings) | |
MALLOC_CONF=invalid_flag:foo ruby -v |
function replaceAll(str, find, replace) { | |
return str.replace(new RegExp(find, 'g'), replace); | |
} | |
function dec2hex(dec, padding){ | |
return parseInt(dec, 10).toString(16).padStart(padding, '0'); | |
} | |
function utf8StringToUtf16String(str) { | |
var utf16 = []; |
# GLiNet MT300N-V2 安装 SSR plus 插件 | |
GLiNet 是一家 生产 便携路由的国内厂商 好像外销为主。 | |
最主要的是他家 路由系统采用的是开源 OpenWrt 系统 并在github 上开源 并提供sdk 和 很多插件 | |
但是国内政策的关系 国内买到的路由器固件内 并没有提供直接安装 SS SSR V2ray 的方法。 | |
经过在 恩三论坛 学习了下(www.right.com.cn) 已经成功把lean 开源的(https://github.com/coolsnowwolf/lede.git) SSR plus 插件 成功的安装到了 MT300N-V2 固件中,下面记录一些安装步骤。 |
:root { | |
--heng-fa-chuen: #b51921; | |
--tai-koo: #b2103e; | |
--kowloon-bay: #c41832; | |
--tseung-kwan-o: #ef342a; | |
--wui-kai-sha: #a84d18; | |
--po-lam: #f68f26; | |
--sai-wan-ho: #faca07; | |
--disneyland-resort: #07594a; | |
--skek-kip-mei: #4ba946; |
require 'digest' | |
# From activestorage | |
def compute_checksum_in_chunks(io) | |
Digest::MD5.new.tap do |checksum| | |
while chunk = io.read(5242880) | |
checksum << chunk | |
end | |
io.rewind | |
end.base64digest |
/** | |
* useScroll React custom hook | |
* Usage: | |
* const { scrollX, scrollY, scrollDirection } = useScroll(); | |
*/ | |
import { useState, useEffect } from "react"; | |
export function useScroll() { | |
const [lastScrollTop, setLastScrollTop] = useState(0); |
I'm using Ansible only for Configuration Management, the server is up and I want to configure users, install packages and configure them.
For infrastructure provisioning terraform.io is nice!
Currently, my deployment flow includes Drone.io/GitlabCI for CI/CD and Docker Swarm for orchestrating containers.
gem 'active_model_serializers' | |
rails g serializer publication | |
app/serializers/api/v1/publication_serializer.rb | |
module API::V1 | |
class PublicationSerializer < ActiveModel::Serializer | |
attributes :title | |
end |