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 / 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 {
@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 / .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
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'
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);
@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;