Skip to content

Instantly share code, notes, and snippets.

View lily-mara's full-sized avatar
💖

Lily Mara lily-mara

💖
View GitHub Profile
@lily-mara
lily-mara / daily-template.md
Created October 17, 2022 22:42
Obsidian dataview created/updated view

Created

LIST where file.ctime >= date(this.file.day) AND file.ctime < (date(this.file.day) + dur(1 day))

Updated

LIST where 
	file.mtime >= date(this.file.day) 
	AND
@lily-mara
lily-mara / obsidian-web-clipper.js
Created August 19, 2022 22:41 — forked from kepano/obsidian-web-clipper.js
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@lily-mara
lily-mara / main.rs
Last active July 31, 2021 02:52
This is a bug demonstration for Rustyline 8.2
use std::fs::remove_file;
use std::{fs::File, io::Read};
use rustyline::{config::Configurer, Editor};
fn main() {
test(1);
test(100);
}
use std::fs::File;
use nu_errors::ShellError;
use nu_plugin::{serve_plugin, Plugin};
use nu_protocol::{CallInfo, ReturnValue, Signature, SyntaxShape};
struct FromJson;
impl Plugin for FromJson {
fn config(&mut self) -> Result<Signature, ShellError> {
DEBUG 2018-10-04T19:08:08Z: cargo::core::registry: load/missing https://git.corp.com/tools/logging-helper#b0cb6965
DEBUG 2018-10-04T19:08:08Z: cargo::core::registry: loading source https://git.corp.com/tools/logging-helper#b0cb6965
DEBUG 2018-10-04T19:08:08Z: cargo::sources::config: loading: https://git.corp.com/tools/logging-helper#b0cb6965
TRACE 2018-10-04T19:08:08Z: cargo::core::source::source_id: loading SourceId; https://git.corp.com/tools/logging-helper#b0cb6965
Updating git repository `https://git.corp.com/tools/logging-helper`
TRACE 2018-10-04T19:08:08Z: cargo::sources::git::source: updating git source `GitRemote { url: "https://git.corp.com/tools/logging-helper" }`
DEBUG 2018-10-04T19:08:08Z: cargo::sources::git::utils: skipping gc as there's only 0 pack files
DEBUG 2018-10-04T19:08:08Z: cargo::sources::git::utils: doing a fetch for https://git.corp.com/tools/logging-helper
DEBUG 2018-10-04T19:08:08Z: cargo::sources::git::utils: initiating fetch of refs/heads/*:refs/heads/* from https://git.corp
def greater_than_5(x):
return x > 5
// From https://github.com/tailhook/quick-error
#[macro_export]
macro_rules! quick_error {
( $(#[$meta:meta])*
pub enum $name:ident { $($chunks:tt)* }
) => {
quick_error!(SORT [pub enum $name $(#[$meta])* ]
items [] buf []
queue [ $($chunks)* ]);
{
"builders": [
{
"type": "docker",
"image": "frolvlad/alpine-python3",
"export_path": "image.tar"
}
],
"provisioners": [
{
provider "docker" {
host = "unix:///var/run/docker.sock"
}
resource "docker_container" "foo" {
image = "${docker_image.alpine.latest}"
name = "foo"
command = ["/bin/cat", "/etc/issue"]
}
@lily-mara
lily-mara / eu-cookie.json
Last active March 14, 2016 12:55
The cookie that is sent to your browser if you navigate to http://ec.europa.eu/justice/cookies/index_en.htm and click "I Refuse Cookies"