Skip to content

Instantly share code, notes, and snippets.

Pamela Fox pamelafox

Block or report user

Report or block pamelafox

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@pamelafox
pamelafox / hosts
Created Jul 23, 2018
etc/hosts for news blocking
View hosts
### News Aggregators
127.0.0.1 redditate.com
127.0.0.1 news.google.com
127.0.0.1 news.yahoo.com
127.0.0.1 news.ycombinator.com
### News
127.0.0.1 cnn.com
127.0.0.1 recode.net
127.0.0.1 techcrunch.com
127.0.0.1 mashable.com
View scraper_pickup.py
from bs4 import BeautifulSoup
import requests
import string
def save_to_file(filename, sayings):
file = open(filename, "w")
file.write("\n".join(sayings).encode("utf-8"))
file.close()
@pamelafox
pamelafox / GlowingSun.java
Created May 18, 2018
GlowingSun Processing Program
View GlowingSun.java
void setup() {
size(640, 360);
}
void draw() {
background(135, 206, 235);
noStroke();
@pamelafox
pamelafox / GrassyField.java
Created May 18, 2018
GrassyField Processing Program
View GrassyField.java
void setup() {
size(640, 360);
}
void draw() {
colorMode(HSB);
// Draw blue sky
background(134, 74, 255);
View NoiseLandscape.java
// See documentation @ https://processing.org/reference/noise_.html
float noiseScale = 0.02;
void setup() {
size(640, 360);
}
void draw() {
background(0);
@pamelafox
pamelafox / RainDrop.java
Created May 18, 2018
RainStormSystem Processing Program
View RainDrop.java
// A simple Particle class
class RainDrop {
int x;
int y;
RainDrop(int startX, int startY) {
this.x = startX;
this.y = startY;
}
View playerscores.sql
CREATE TABLE IF NOT EXISTS playerscores (player TEXT, score INTEGER);
INSERT INTO playerscores VALUES ("Miss P", 34);
INSERT INTO playerscores VALUES ("Mr H", 99);
INSERT INTO playerscores VALUES ("Miss Piggy", 10);
SELECT * FROM playerscores ORDER BY score DESC LIMIT 10;
@pamelafox
pamelafox / ThinkBeforeYouTweet.js
Last active Jun 2, 2018
ThinkBeforeYouTweet - a Nudge for HabitLab to prompt reflection before tweeting
View ThinkBeforeYouTweet.js
// Nudge for twitter.com for HabitLab
// You can use it by installing HabitLab for Chrome,
// and then in settings, click Code your own Nudge and paste this code in
// TODOS:
// Make a version for TweetDeck
// Remove nudgeContainer once tweet is successfully sent
const $ = require('jquery');
require_component('habitlab-logo-v2');
@pamelafox
pamelafox / MediumFeedEater.js
Created Mar 8, 2018
Medium Feed Eater for HabitLab
View MediumFeedEater.js
const $ = require('jquery');
require_component('habitlab-logo-v2');
require_component('paper-button');
function removeFeed() {
var re = new RegExp('medium.com\/\??.*$');
if (!re.test(window.location.href)) {
return;
}
$('.streamItem').css('display', 'none');
@pamelafox
pamelafox / PULL_REQUEST_TEMPLATE.md
Created Dec 7, 2017
The pull request template for Woebot.
View PULL_REQUEST_TEMPLATE.md

High-level description of change

Why you made these changes (how it helps us or our users)

Are there performance implications for this change?

REPLACE THIS: Please profile using time/timeEnd any potentially time-taking changes. Then profile using node profiler to identify what aspects take most time.

Have you added tests to cover this new/updated code?

You can’t perform that action at this time.