Skip to content

Instantly share code, notes, and snippets.

@mhfowler
mhfowler / learning-rust-and-exercises.md
Created May 3, 2021 09:28
Rust Exercises & Learning
> "cells": [
> {
> "cell_type": "code",
> "execution_count": 407,
> "metadata": {},
> "outputs": [],
> "source": [
> "text = \"yellow orange red purple blue green\""
> ]
> },
Git Commit Messages
- Use the present tense ("Add feature" not "Added feature")
- Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
- Limit the first line to 72 characters or less
- Reference issues and pull requests liberally
What systems and thought-processes do you use to store & organize files/links/media?
__________________________________________
** anon1
I don't have good methods. I use pinboard (I add links that I really love and want to remember publicly, and I add clutter-y stuff that I want to go back -- like programming links -- on private), are.na, twitter, tumblr, spotify, itunes, searches (through gmail and slack, mostly), goodreads (I put book quotes on there in my 'reviews'), google drive (mostly for notes. have been trying to move away from this because I feel weird about google, but people keep making useful spreadsheets and putting up folders full of books, etc, so I keep going back to it), dropbox, icloud. I've occasionally used s3 to store random bits I want to share. for most things, I don't have any good organization system; I mostly end up relying on my own memory and searches. I've found it hard to organize things that aren't really searchable...the sort of things I don't think about much, and don't really
What systems and thought-processes do you use to store & organize files/links/media?
______________________________________________________________________________________________
** Christian Drappi
(1) Slack channels/DMs (2) Tweets
arena: I do not use are.na but it looks interesting! Just logged in.
______________________________________________________________________________________________
** Callil
flattenArr(arr):
# base case
## how to check if a variable is an array http://stackoverflow.com/questions/767486/how-do-you-check-if-a-variable-is-an-array-in-javascript
if (arr.constructor != Array) {
return [arr];
}
# recursion
else {
foundElements = []
for (var i = 0; i < arr.size; i++) {
*h*e*l*l*o*w*o*r*l*d*o*h*e*l*l*o*w*o*r*l*d*w*h*e*l*l*o*w*o*r*l*d*o*h*e*l*l*o*w*o*r*l*d*r*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*d*h*e*l*l*o*w*o*r*l*d*r*h*e*l*l*o*w*o*r*l*d*h*h*e*l*l*o*w*o*r*l*d*e*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*o*h*e*l*l*o*w*o*r*l*d*w*h*e*l*l*o*w*o*r*l*d*o*h*e*l*l*o*w*o*r*l*d*r*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*d*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*h*h*e*l*l*o*w*o*r*l*d*e*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*o*h*e*l*l*o*w*o*r*l*d*w*h*e*l*l*o*w*o*r*l*d*o*h*e*l*l*o*w*o*r*l*d*r*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*d*h*e*l*l*o*w*o*r*l*d*d*h*e*l*l*o*w*o*r*l*d*h*h*e*l*l*o*w*o*r*l*d*e*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*o*h*e*l*l*o*w*o*r*l*d*w*h*e*l*l*o*w*o*r*l*d*o*h*e*l*l*o*w*o*r*l*d*r*h*e*l*l*o*w*o*r*l*d*l*h*e*l*l*o*w*o*r*l*d*d*h*e*l*l*o*w*o*r*l*d*
Python(21864,0x7fff74175000) malloc: *** mach_vm_map(size=91899459727147008) failed (error code=3)
*** error: can't allocate region
*** set a br
@mhfowler
mhfowler / vampire_social_code.txt
Last active March 12, 2016 00:06
vampire social code
vampire social code:
not going to invite myself to anything
will suggest ideas with "sometime we should"
going to invite people with "if you want to join lmk"
if people invite themselves going to say no
will also try to intuit when friends need help and reach out to them