Skip to content

Instantly share code, notes, and snippets.

View melaniehoff's full-sized avatar
💭
organizing https://sfpc.io/code-societies

Melanie Hoff melaniehoff

💭
organizing https://sfpc.io/code-societies
View GitHub Profile
@melaniehoff
melaniehoff / icm-week3-mel-soy
Last active June 29, 2016 11:42
WATCH HIM WATCH HIM WATCH ME
var Mx = 940;
var My = 80;
var d = 50;
var x = 0;
var y = 0;
//Melanie's variables
var playing = false;
var staticTv;
var request = require('request');
var cheerio = require('cheerio');
var base_url = 'https://yandex.ru/images/search?rpt=imageview&img_url=';
var re = /img_url=(.*?)&rpt=/;
var url = 'http://107.170.164.22:3000/chino1448317021600.jpg';
get_similar(url, finished);
imageData = canv.elt.toDataURL();
var blobBin = atob(imageData.split(',')[1]);
var array = [];
for (var i = 0; i < blobBin.length; i++) {
array.push(blobBin.charCodeAt(i));
}
var imageFile = new Blob([new Uint8Array(array)], {
type: 'image/png'
@melaniehoff
melaniehoff / .bash_profile
Last active October 10, 2020 23:52
My color-coded, crafted, .bash_profile <3
# to remove the title bar around iterm2, download this beta version https://www.iterm2.com/version3.html
# preferences -> appearance -> window -> uncheck: show border around window
# use this alias to switch to conda python3
alias condapy='export PATH="/anaconda/bin:$PATH"'
# Homebrew
export PATH=/usr/local/bin:$PATH
# installed gny coreutils in order to get colors
@melaniehoff
melaniehoff / random_folder.py
Last active June 9, 2019 00:09
A *truly* Random Folder
import glob
import random
import shutil
import os
import pickle
## Make an empty folder called Random and put it on your desktop
## Make an empty file called all_my_files.txt and put it in the same dir as random_folder.py
## Replace my file paths with yours
@melaniehoff
melaniehoff / CENTERED_index.html
Last active May 4, 2018 01:30
D3A - embed p5.js sketch centered on a page.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8"/>
<script>
// JAVASCRIPT COULD GO HERE
</script>
<style type="text/css">
body {

📞 🌿 Detroit Students' Peer-to-Peer address book on the distributed web

Folder Poetry Prompt: 🏡 A Village You Want to Live In

  • Write about the village you would like to imagine living in. This can take the form of a paragraph, a mind map, or a list. Bring your writing to class to share with each other tommorrow.
  • your description does not have to be realistic or even physically probable. What would your ideal living environment look like? What is your utopia?
  • What is your village called?
  • Consider how you would like to share space with others in your environment.
  • In your village, how do you communicate and care for each other? How are people held?

P2P Folder Poetry SFPC YCAM

What if we could transform our online networks from something we passively receive to something we actively create? Folder Poetry is the practice of using the structure of computer folder organization as a new kind of poetic form like the haiku or iambic pentameter. By naming and nesting folders and files, we can create unfolding narratives, rhythmic prose, and choose-your-own-adventure poetry. In this workshop we will collectively create peer-to-peer folder poetry using the command line and Dat. Through lecture, examples, and writing folder poetry as meditation, we will explore the narrative qualities of folder structures and DAT as a tool for building digital spaces with and for our networks.

In this session we will get intimate with computers and write poetry with their logic. This workshop is an introduction to writing folder poetry, the P2P protocol Dat, and navigating the command line interface using Bash.

Together, we will create living networked poetry through connecti

Always Already Programming

Everyone who interacts with computers has in important ways always already been programming them.

Every time you make a folder or rename a file on your computer, the actions you take through moving your mouse and clicking on buttons, translate into text-based commands or scripts which eventually translate into binary.

Why are the common conceptions of programmer and user so divorced from each other? The distinction between programmer and user is reinforced and maintained by a tech industry that benefits from a population rendered computationally passive. If we accept and adopt the role of less agency, we then make it harder for ourselves to come into more agency.

We've unpacked the "user" a little, now let's look at the "programmer." When a programmer is writing javascript, they are using prewritten, packaged functions and variables in order to carry out the actions they want their code to do. In this way, the programmer is also the user. Why is using pre-made scripts seen

@melaniehoff
melaniehoff / bash-commands.md
Last active February 2, 2023 02:07
Bash & Terminal Commands (For Folder Poetry)

🎲 Bash & Terminal commands

Command Description
cd change directory
cd .. change directory one level back
ls list contents of directory
pwd print working directory
mkdir foldername create a folder named foldername
touch dandelion.txt create a file named dandelion.txt