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
;; Adpated from https://gist.github.com/jmn/34cd4205fa30ccf83f94cb1bc0198f3f | |
;; Automatically fetch link description (C-c C-l) for link at point | |
(defun my/url-get-title (url &optional descr) | |
(with-temp-buffer | |
(url-insert-file-contents url) | |
(goto-char (point-min)) | |
(search-forward-regexp (rx "<title>" (group (*? anything)) "</title>")) | |
(match-string 1))) |
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
# https://askubuntu.com/questions/455762/xbindkeys-wont-work-properly | |
"xset r off; xdotool keyup --window 0 XF86Calculator key --clearmodifiers --window 0 ctrl+shift+Tab; xset r on" | |
XF86Calculator | |
"xset r off; xdotool keyup --window 0 XF86HomePage key --clearmodifiers --window 0 ctrl+Tab; xset r on" | |
XF86HomePage |
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
def apply_chunked(data, fn, dim): | |
""" | |
Some xarray operations, such as resample disregard the fact that the loaded data set is distributed via dask. | |
This function applies any such operation to each chunk individually. | |
Arguments: | |
data: the xarray.Dataset | |
fn: any unary function acting on an xarray.Dataset | |
dim: the dimension to split chunks across as str | |
""" |
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 | |
cd $(dirname $0) | |
set -e |
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
macro swizzle(vec, components) | |
function index(component) | |
(component == 'x' || component == 'r') && return 1 | |
(component == 'y' || component == 'g') && return 2 | |
(component == 'z' || component == 'b') && return 3 | |
(component == 'w' || component == 'a') && return 4 | |
error("swizzling components must be one of x, y, z, w") | |
end | |
accesses = [Expr(:ref, :vec, index(component)) for component in string(components)] |
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
Show hidden characters
{ | |
"shell_cmd": "cd ${project_path} && odin build . -debug", | |
"file_regex": "^(..[^:]*)\\(([0-9]+):?([0-9]+)?\\):? (.*)$", | |
"selector": "source.odin" | |
} |
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
package main | |
import "vendor:glfw" | |
import "core:math/linalg" | |
import "core:fmt" | |
import vk "vendor:vulkan" | |
import "core:dynlib" | |
instance: vk.Instance |
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
{ | |
"fullName": "English (Colemak-DH ISO)", | |
"name": "us-colemak_dh_iso", | |
"singletonKeys": [ | |
[ "CapsLock", "Alt_L" ], | |
[ "Shift_L", "Backspace" ], | |
[ "Control_L", "Win_L" ], | |
[ "Win_L", "Control_L" ], | |
[ "Alt_L", "Shift_L" ], | |
[ "Alt_R", "Extend" ], |
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
"scripts": { | |
"build": "spago build --purs-args \"--censor-codes=UserDefinedWarning\"", | |
"dev": "concurrently -rki \"pscid --censor-codes UserDefinedWarning\" \"parcel assets/index.html\"", | |
"test": "spago test --purs-args \"--censor-codes=UserDefinedWarning\"", | |
"serve": "http-server dist", | |
"bundle:build": "NODE_ENV=production spago build --purs-args '--codegen corefn'", | |
"bundle:dce": "NODE_ENV=production zephyr Main.main", | |
"bundle:parcel": "NODE_ENV=production parcel build assets/index.html --no-source-maps --log-level 4", | |
"bundle:prerender": "bash scripts/prerender.sh", | |
"bundle": "npm run bundle:build && npm run bundle:dce && npm run bundle:parcel && npm run bundle:prerender", |
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
name: CI | |
on: | |
push: | |
branches-ignore: | |
- dist-preview | |
- dist | |
jobs: | |
build: |
NewerOlder