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
function convertCSVFilesToSheets() { | |
var folderId = "DRIVE_FOLDER_ID"; // Replace with the ID of your folder | |
var spreadsheetId = "SHEET_ID"; // Replace with the ID of your spreadsheet | |
var folder = DriveApp.getFolderById(folderId); | |
var files = folder.getFiles(); | |
var spreadsheet = SpreadsheetApp.openById(spreadsheetId); | |
while (files.hasNext()) { |
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/sh | |
# Executed from helix using :pipe-to github-browse-file %{dirname} %{filename} %{linenumber} | |
OPEN_URL_COMMAND=open | |
DIR_NAME=$1 | |
FILE_NAME=$2 | |
LINE_NUMBER=$3 |
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
use std::fs; | |
use std::str::FromStr; | |
#[derive(Copy, Clone, Debug)] | |
enum CpuOpcode { | |
Noop, | |
Addx(i64), | |
} | |
impl FromStr for CpuOpcode { |
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
use std::collections::HashSet; | |
use std::io::{self, BufRead}; | |
use itertools::Itertools; | |
fn read_input() -> Vec<Vec<char>> { | |
let stdin = io::stdin(); | |
let handle = stdin.lock(); | |
handle |
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
fn main() { | |
let input = read_input(); | |
let sum: u64 = input | |
.iter() | |
.map(|(shape, outcome)| { | |
let action = match outcome { | |
Outcome::Lose => loses_against, | |
Outcome::Draw => draws_against, | |
Outcome::Win => wins_against, | |
}; |
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
Debugger entered--Lisp error: (wrong-type-argument (or eieio-object class) nil obj) | |
signal(wrong-type-argument ((or eieio-object class) nil obj)) | |
eieio-oref(nil children) | |
(nconc (eieio-oref (eieio-oref section127 'parent) 'children) (list section127)) | |
(eieio-oset (eieio-oref section127 'parent) 'children (nconc (eieio-oref (eieio-oref section127 'parent) 'children) (list section127))) | |
(if (eq section127 magit-root-section) (let ((magit-section-cache-visibility nil)) (magit-section-show section127)) (eieio-oset (eieio-oref section127 'parent) 'children (nconc (eieio-oref (eieio-oref section127 'parent) 'children) (list section127)))) | |
(catch 'cancel-section (magit-run-section-hook 'magit-status-sections-hook) (run-hooks 'magit-insert-section-hook) (magit-insert-child-count section127) (set-marker-insertion-type (eieio-oref section127 'start) t) (let* ((end (eieio-oset section127 'end (point-marker))) (map (intern (format "magit-%s-section-map" (eieio-oref section127 'type)))) (map (and (boundp map) |
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
#!/usr/bin/env python | |
""" | |
This only ports the 'shell' of the function, not the real code. | |
But it is a handy start. | |
To use put this code in your $PATH and then in (r)emacs mark the function as | |
a region and M-| rustize-emacs. The result can then be copied into a Rust | |
source file. | |
TODO: |