Skip to content

Instantly share code, notes, and snippets.

@MimiOnuoha
MimiOnuoha / gist:f50c8c71a2569b2e1b8d
Last active August 29, 2015 14:15
Access Firefox/Chrome search keywords
## Super simple Python code for querying a Chrome or Firefox database to access keywords and put them into a CSV.
## You'll need to make sure that your browser history file is already in the working directory, find them at below paths for OSX:
## Chrome: /Users/$USER/Library/Application Support/Google/Chrome/Default/Preferences
## Firefox: /Users/$USER/Library/Application Support/Firefox/Profiles/$PROFILE.default/places.sqlite
import dataset, csv
def grab_keywords(filename):
@MimiOnuoha
MimiOnuoha / neon-keypress.js
Last active August 26, 2017 20:08
Controlling a neon light with the command line
var readline = require('readline'); // required so we can use the command line to read keypresses
var five = require("johnny-five"); // required so we can use the johnny five library
var board = new five.Board(); // initializing our board
function keyPressEvent() {
readline.emitKeypressEvents(process.stdin);
process.stdin.setRawMode(true);
process.stdin.on('keypress', (str, key) => {
var led = new five.Led(11); // Change this if you want to change which pin your light is connected to
@MimiOnuoha
MimiOnuoha / earthquake_markers.html
Last active December 15, 2021 04:10
Mapbox GL JS example with custom markers and popups
<!-- Documentation: https://www.mapbox.com/mapbox-gl-js/style-spec/#sources-geojson -->
<!-- Mapbox styles: https://github.com/mapbox/mapbox-gl-styles -->
<!-- Earthquake data: https://earthquake.usgs.gov/ -->
<!DOCTYPE html>
<html lang="es">
<head>
<style>
body {
margin: 0;
// A p5 version of this animation: https://dribbble.com/shots/2933993-Spinning-Circle-Animation
let angle1 = 0;
let angle2 = 0;
let circleDiam = 120;
let spacing = 40;
function setup() {
createCanvas(400, 400);