When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:
main {
max-width: 38rem;
padding: 2rem;
margin: auto;
}| import * as LinkifyIt from 'linkify-it'; | |
| import * as React from 'react'; | |
| import * as tlds from 'tlds'; | |
| /* Pass tests | |
| describe('linkify work as expected', () => { | |
| let rst: React.ReactNode[] = []; | |
| it('linkify empty content', () => { | |
| rst = linkify(''); | |
| expect(rst[0]).toBe(''); |
React recently introduced an experimental profiler API. After discussing this API with several teams at Facebook, one common piece of feedback was that the performance information would be more useful if it could be associated with the events that caused the application to render (e.g. button click, XHR response). Tracing these events (or "interactions") would enable more powerful tooling to be built around the timing information, capable of answering questions like "What caused this really slow commit?" or "How long does it typically take for this interaction to update the DOM?".
With version 16.4.3, React added experimental support for this tracing by way of a new NPM package, scheduler. However the public API for this package is not yet finalized and will likely change with upcoming minor releases, so it should be used with caution.
| package main | |
| import "fmt" | |
| func main() { | |
| slice := make([]int, 159) | |
| // Split the slice into batches of 20 items. | |
| batch := 20 |
| #!/bin/bash | |
| # http://serverfault.com/questions/410321/debian-ip6tables-rules-setup-for-ipv6/410327#410327 | |
| # http://ipset.netfilter.org/iptables.man.html | |
| # https://www.sixxs.net/wiki/IPv6_Firewalling | |
| # https://www.cyberciti.biz/faq/ip6tables-ipv6-firewall-for-linux/ | |
| # https://gist.github.com/thomasfr/9712418 | |
| # https://gist.github.com/SnakeDrak/f4150f6e517e5a1d525f | |
| # http://www.thegeekstuff.com/2011/06/iptables-rules-examples | |
| # http://www.thegeekstuff.com/scripts/iptables-rules |
| set-option -g default-shell "/usr/local/bin/fish" | |
| set -g default-terminal "xterm-256color" |
| # -*- coding: utf8 -*- | |
| """ | |
| ip_location | |
| ~~~~~~~~~~~ | |
| Using ip138.com to lookup location via ip. | |
| """ | |
| import requests | |
| from bs4 import BeautifulSoup |
| /** | |
| * Wechat token validation scripts. | |
| * required node >= 4.2.1 | |
| * You need change the `token` if need. | |
| */ | |
| 'use strict'; | |
| const crypto = require('crypto'); | |
| const http = require('http'); | |
| const querystring = require('querystring'); |
| # -*-coding: utf8-*- | |
| import datetime | |
| def to_localtime(utc_timestamp): | |
| """Convert utc timestamp to local timestamp. | |
| :param datetime utc_timestamp: Timestamp from utc | |
| :return: Local timestamp. | |
| """ |