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
Attaching to zkevm-pool-db, zkevm-prover, zkevm-rpc, zkevm-state-db, zkevm-sync | |
zkevm-pool-db | | |
zkevm-pool-db | PostgreSQL Database directory appears to contain a database; Skipping initialization | |
zkevm-state-db | | |
zkevm-pool-db | | |
zkevm-state-db | PostgreSQL Database directory appears to contain a database; Skipping initialization | |
zkevm-state-db | | |
zkevm-sync | Version: v0.3.3 | |
zkevm-sync | Git revision: d36d1d3 | |
zkevm-sync | Git branch: HEAD |
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 | |
# Usage: | |
# EMAIL='you@example.com' PASSWORD='your password' bash api_v2_getting_started.sh | |
TOKEN= | |
GET() { | |
curl -s -H 'content-type: application/json' \ | |
-H "authorization: Bearer ${TOKEN}" \ |
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
CC = clang | |
CFLAGS += -Iinclude | |
main: src/main.o | |
$(CC) $(CFLAGS) -o main src/main.o |
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
set -euxo pipefail | |
PROVIS_PATH="$HOME/provis" | |
git clone https://github.com/vastus/provis.git ${PROVIS_PATH} | |
make -C ${PROVIS_PATH} common |
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 | |
# https://stackoverflow.com/a/46460200 | |
hidutil property --set \ | |
'{"UserKeyMapping": [{"HIDKeyboardModifierMappingSrc": 0x700000039, "HIDKeyboardModifierMappingDst": 0x7000000e0 }] }' |
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
{ config, lib, pkgs, ... }: | |
with lib; | |
let | |
cfg = config.services.xserver.windowManager.dwm; | |
dwm = | |
if cfg.configFile | |
then (pkgs.dwm.overrideAttrs (old: { postPatch = "cp ${cfg.configFile} config.h"; })) |
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
"""Local Airflow settings (policy)""" | |
from datetime import timedelta | |
from airflow.models import TaskInstance | |
DEFAULT_EXECUTION_TIMEOUT = timedelta(hours=48) | |
def policy(task: TaskInstance) -> None: |
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
/* | |
* Notes | |
* | |
* Make sure you know the size of your data and use proper functions or style | |
* to not introduce bottlenecks by mistake. | |
* | |
* If we get inlined functions to Node/JS, using declarative programs will be | |
* almost as fast as imperative ones by the magic of transducers. Transducers | |
* will do a single pass (reduce) on the input with the composition of the | |
* given transformation functions. |
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
import R from 'ramda'; | |
type Invoice = { | |
invoiceDate: Date; | |
}; | |
// latestInvoice :: Invoice[] -> Invoice | |
const latestInvoice = R.compose<Invoice[], Invoice[], Invoice[], Invoice>( | |
R.head, | |
R.sort(R.descend(R.prop('invoiceDate'))), |
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
<?php | |
/* | |
* Getting too many redirects when SSL is not on and the WP_HOME and | |
* WP_SITEURL settings are set. | |
* | |
* These settings should work with CloudFront and a WP instance. | |
* You have to set custom headers for the origin for this fix to work. | |
* | |
* x-protocol: https |
NewerOlder