see: https://myrepos.branchable.com/install/
sudo apt-get install myrepos
brew install myrepos
| import { PerformanceObserver, performance } from 'perf_hooks'; | |
| import R from "ramda"; | |
| const perfObserver = new PerformanceObserver((items) => { | |
| items.getEntries().forEach((entry) => { | |
| console.log(`${entry.name}: ${entry.duration}}`) | |
| }) | |
| }) | |
| perfObserver.observe({entryTypes: ["measure"]}) |
| import R from 'ramda' | |
| export async function mapAsync<Type, ReturnedType>( | |
| promiseFunc: (value: Type) => Promise<ReturnedType>, | |
| values: Type[], | |
| chunk = 3 | |
| ) { | |
| const processChunk = processWithFunction<Type, ReturnedType>(promiseFunc) | |
| const chunks = R.splitEvery(chunk, values) | |
| return R.flatten(await R.reduce(processChunk, Promise.resolve([]), chunks)) |
| import { AsyncLocalStorage } from 'async_hooks'; | |
| const context = new AsyncLocalStorage; | |
| export function getStore() { | |
| return context; | |
| } | |
| export function run(cb) { |
| locals { | |
| file_path = "${var.path}/${var.file_name}" | |
| commit_hash = data.external.commit_hash.result.commit | |
| } | |
| data "external" "commit_hash" { | |
| program = ["echo", "{ \"commit\" : \"$(git rev-parse HEAD)\"}"] | |
| } | |
| resource "null_resource" "upload_zip_to_s3" { | |
| triggers = { | |
| zip_file_changed = filebase64sha256(local.file_path) // handle update latest version case |
| @media (prefers-color-scheme: dark) { | |
| body { | |
| background-color: #444; | |
| color: #e4e4e4; | |
| } | |
| a { | |
| color: #e39777; | |
| } | |
| img { | |
| filter: grayscale(30%); |
see: https://myrepos.branchable.com/install/
sudo apt-get install myrepos
brew install myrepos
| { | |
| // Use IntelliSense to learn about possible attributes. | |
| // Hover to view descriptions of existing attributes. | |
| // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "type": "node", | |
| "name": "jest run current file", | |
| "request": "launch", |
| # add this to your .profile | |
| export DOCKERHOST=$(ifconfig | grep -E "([0-9]{1,3}\.){3}[0-9]{1,3}" | grep -v 127.0.0.1 | awk '{ print $2 }' | cut -f2 -d: | head -n1) |
| data:text/html,<body%20oninput="i.srcdoc=h.value+'<style>'+c.value+'</style><script>'+j.value+'</script>'"><style>textarea,iframe{width:100%;height:50%}body{margin:0}textarea{width:33.33%;font-size:18}</style><textarea%20placeholder=HTML%20id=h></textarea><textarea%20placeholder=CSS%20id=c></textarea><textarea%20placeholder=JS%20id=j></textarea><iframe%20id=i> |
| execute 'apt-get-update' do | |
| command 'apt-get update' | |
| ignore_failure true | |
| end | |
| # on host install | |
| package 'iptables-persistent' do | |
| action :install | |
| end |