https://chromium.googlesource.com/chromium/src/+/master/docs/linux_build_instructions.md
https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md#usage-as-a-c_library
https://chromium.googlesource.com/chromium/src/+/lkcr/docs/linux_suid_sandbox_development.md
About the chrome_sandbox
: it's still needed https://bugs.archlinux.org/task/36969
https://www.chromium.org/developers/gn-build-configuration
This file contains 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 | |
set -euo pipefail | |
if [[ ${#} -lt 1 ]]; then | |
echo "Usage: git-reset-date-order BRANCH_UPSTREAM | |
Resets the author and committer dates of each commit of a branch so they are in order. The | |
reference date is the committer date of the HEAD commit, and the date gets decremented by 1 minute | |
for every parent commits. |
This file contains 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
// This (kind of ugly) syntax emulates a JSX output | |
module.exports = function Counter(state, setState) { | |
return [ | |
"div", | |
{}, | |
[ | |
"button", | |
{ | |
disabled: state.count > 0 ? false : "disabled", |
This file contains 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
type TypeOfSchema<T extends any> = | |
T extends { type: "null" } ? | |
null : | |
T extends { type: "boolean" } ? | |
boolean : | |
T extends { type: "object" } ? | |
{ [K in keyof T["properties"]]: TypeOfSchema<T["properties"][K]> } : | |
T extends { type: "array" } ? | |
T extends { items: infer U } ? |
This file contains 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Improved</title> | |
</head> | |
<body> | |
<div id="leader" style="height: 40px; width: 40px; background: red; position: absolute; border-radius: 50%"></div> | |
<script type="module"> |
This file contains 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
const colors = ["red", "blue", "yellow", "white", "black"] | |
function createChart(width, height) { | |
const svg = d3.select("body") | |
.append("svg") | |
.attr("width", width) | |
.attr("height", height) | |
.attr("viewBox", `0 0 ${width} ${height}`) | |
.attr("style", "background-color: grey; margin: 10px") | |
const cellsPerDomain = 24 |
This file contains 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
const assert = require('assert') | |
const rowCount = 7 | |
const maxCellsCount = 40 | |
const cellsPerDomain = 24 | |
const domainCount = Math.floor(maxCellsCount / cellsPerDomain) | |
const cellsCount = domainCount * cellsPerDomain | |
const columnCount = Math.ceil(cellsCount / rowCount) | |
const cellRow = c => rowCount - 1 - c % rowCount | |
const cellColumn = c => columnCount - 1 - Math.floor(c / rowCount) | |
const domainFirstCell = d => d * cellsPerDomain |
This file contains 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
const colors = ["red", "blue", "yellow", "white", "black"] | |
function createChart(width, height) { | |
const svg = d3.select("body") | |
.append("svg") | |
.attr("width", width) | |
.attr("height", height) | |
.attr("style", "background-color: grey; margin: 10px") | |
const minCellSize = 16 | |
const cellSpacing = 6 |
This file contains 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
extern crate kuchiki; | |
#[macro_use] | |
extern crate string_cache; | |
macro_rules! h{ | |
($name:tt) => { | |
h!($name { } =>) | |
}; | |
($name:tt => $($other:expr)*) => { | |
h!($name { } => $($other)*) |
This file contains 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 | |
set -euo pipefail | |
if [[ $# -eq 0 ]]; then | |
echo "Usage: $0 mydomain.com" | |
exit 1 | |
fi | |
name=$1 |
NewerOlder