Skip to content

Instantly share code, notes, and snippets.

View y-nk's full-sized avatar
🇹🇭
reviewing PRs

Julien Barbay y-nk

🇹🇭
reviewing PRs
View GitHub Profile
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<HostName>myhostname.com</HostName>
<ReplaceKeyPrefixWith>#!/</ReplaceKeyPrefixWith>
</Redirect>
</RoutingRule>
@y-nk
y-nk / index.html
Created April 8, 2021 07:22
Gitlab environment variable filter by scope bookmarklet
<!--
how to use:
1. preview this page with: http://htmlpreview.github.io/
2. drag the link in your bookmarks bar
3. visit the page https://gitlab.com/xxxx/-/settings/ci_cd
4. click on the bookmarklet.
-->
<!DOCTYPE html>
<html lang="en">
AB1, AC4, AD10, BE3, CD4, CF2, DE1, EB3, EA2, FD1
// manually generate token for a given page (for when data is available in local)
generateTokenForPage(page: number): string {
return btoa(JSON.stringify({ skip: page * this.recordsPerPage, limit: this.recordsPerPage }));
}
import { parse as parseAst } from "acorn";
import { load as parseYaml } from "js-yaml";
import { parse as parseToml } from "toml";
// stolen from remcohaszing/remark-mdx-frontmatter
const getValue = (node) => {
const { type, value } = node;
if (type === "yaml") {
return load(value);