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
pub fn parse(args: &[Value]) -> Option<PageFilterOrSet> { | |
// TODO: Error handling | |
let and_groups = args | |
.iter() | |
.filter_map(|ag| { | |
if let Ok(and_iter) = ag.try_iter() { | |
Some(PageFilterAndGroup { | |
filters: and_iter | |
.into_iter() | |
.filter_map(|filter_string| { |
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
/posts/20elg89zsnmm--first-post--yeah-yeah /posts/first-post-yeah-yeah--20elg89zsnmm 301 | |
/20elg89zsnmm /posts/first-post-yeah-yeah--20elg89zsnmm 301 | |
/posts/20elg89zsnmm /posts/first-post-yeah-yeah--20elg89zsnmm 301 | |
/first-post-yeah-yeah /posts/first-post-yeah-yeah--20elg89zsnmm 301 | |
/posts/20elgdcxpbhk--jack-as-jake /posts/jack-as-jake--20elgdcxpbhk 301 | |
/20elgdcxpbhk /posts/jack-as-jake--20elgdcxpbhk 301 | |
/posts/20elgdcxpbhk /posts/jack-as-jake--20elgdcxpbhk 301 | |
/jack-as-jake /posts/jack-as-jake--20elgdcxpbhk 301 | |
/posts/20elgjxncy8k--yahoo-music-unlimited--still-very-beta /posts/yahoo-music-unlimited-still-very-beta--20elgjxncy8k 301 | |
/20elgjxncy8k /posts/yahoo-music-unlimited-still-very-beta--20elgjxncy8k 301 |
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
"Agnes", | |
"Albert", | |
"Alex", | |
"Alice", | |
"Alva", | |
"Amelie", | |
"Anna", | |
"Bad News", | |
"Bahh", | |
"Bells", |
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 | |
# This script resolves a DID, retrieves an API key, fetches a user's feed, | |
# and posts a "Hello, world" message to the user's feed. | |
# Resolve DID for handle | |
HANDLE='felicitas.pojtinger.com' | |
DID_URL="https://bsky.social/xrpc/com.atproto.identity.resolveHandle" | |
export DID=$(curl -G \ | |
--data-urlencode "handle=$HANDLE" \ |
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
def perms(data): | |
return_data = [] | |
counter = 1 | |
for x in range(1, len(data) + 1): | |
counter *= x | |
shapes = [ | |
[0, 1, 2, 3], | |
[0, 1, 3, 2], | |
[0, 2, 1, 3], | |
[0, 2, 3, 1], |
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> | |
<head> | |
<script> | |
const theDivs = [ | |
{ | |
id: 'id1', | |
}, | |
{ | |
id: 'id2', |
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
#!/usr/bin/env python3 | |
stuff = { | |
"x": 10, | |
"y": 10 | |
} | |
sinput = "x == y" | |
parts = sinput.split(" == ") |
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
// The code below will output: | |
// | |
// Getting: https://www.example.com/ | |
// Getting: https://www.example.org/ | |
// Getting: https://www.example.net/ | |
// 200 | |
// 200 | |
// 200 | |
// | |
// Given that there's a 5 second delay between 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
local search_buffer, search_window | |
local document_buffer, document_window | |
local storage_dir = "/Users/alans/Desktop/neovim-test-files/" | |
local function open_file() | |
local file_name = vim.api.nvim_buf_get_lines(search_buffer, 0, 1, true) | |
-- I do scrubbing to make sure the file is valid but | |
-- have removed it to focus on the preview part of the example | |
local file_path = storage_dir..'/'..file_name[1] | |
vim.api.nvim_set_current_win(document_window) |
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
from PIL import Image | |
with Image.open('image-2021-05-01T13-10-39-0400.png') as im: | |
img = Image.new('RGB', (1000, 1000), color = 'white') | |
px = im.load() | |
for x in range(301, 309): | |
for y in range(61, 67): |
NewerOlder