This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
This file contains hidden or 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. | |
*/ | |
$protocol = (isset($_SERVER['HTTP_X_FORWARDED_PROTO'])) ? $_SERVER['HTTP_X_FORWARDED_PROTO'] : 'http'; |
This file contains hidden or 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
function compose2<T, U>(g: (n: T) => U, f: (m: T) => T) { | |
return function (x: T) { | |
return g(f(x)); | |
} | |
} | |
const inc = (x: number) => | |
x + 1; | |
const add = (x: number) => (y: number) => |
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<meta name="theme-color" content="#000000"> | |
<!-- | |
manifest.json provides metadata used when your web app is added to the | |
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/ |
This file contains hidden or 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
-- customer IDs and ID types | |
DELETE FROM dm_b2c_marketing.customer_b2c; | |
INSERT INTO dm_b2c_marketing.customer_b2c ( | |
customer_id, | |
id_domain, | |
dp_customer_id | |
) VALUES ( | |
'shogun-alice', | |
'shogun', | |
'dp-inner-alice' |