Skip to content

Instantly share code, notes, and snippets.

View m-r-m-s's full-sized avatar
🔈

mrms m-r-m-s

🔈
View GitHub Profile
@dotcomputercraft
dotcomputercraft / gist:b7283bd52f4b5389e748
Last active June 29, 2024 18:52
How do I completely uninstall Node.js, and reinstall from beginning (Mac OS X)
the best way (I've found) to completely uninstall node + npm is to do the following:
go to /usr/local/lib and delete any node and node_modules
go to /usr/local/include and delete any node and node_modules directory
if you installed with brew install node, then run brew uninstall node in your terminal
check your Home directory for any local or lib or include folders, and delete any node or node_modules from there
go to /usr/local/bin and delete any node executable
You may need to do the additional instructions as well:
sudo rm /usr/local/bin/npm
@aparrish
aparrish / twitterbot.md
Last active May 23, 2022 01:03
Make-A-Twitter-Bot Workshop
@danthareja
danthareja / promises.js
Last active July 25, 2023 03:05
A conjurer's guide to promises
/*
* A quick example of how to use Bluebird and Q to conjure your own promises
*
* Everything going on here is explained further in the following video:
* http://youtu.be/OU7WuVGSuZw?list=PLT-DLWOBKbB4dZ83I_7Ca-sUTvorckG-E
*
*/
// Import node modules
var Q = require('q');
@jqn
jqn / string-incrementer.js
Created January 8, 2015 18:34
JS String Incrementer
/*
Your job is to write a function which increments a string, to create a new string.
If the string already ends with a number, the number should be incremented by 1.
If the string does not end with a number the number 1 should be appended to the new string.
Examples:
foo -> foo1
foobar23 -> foobar24
@ftrain
ftrain / actually.js
Last active November 10, 2023 01:16
A program that generates actuallies
/*
actually.js
_ _ _
__ _ __ _ __ _ __ _ ___| |_ _ _ __ _| | |_ _
/ _` |/ _` |/ _` |/ _` |/ __| __| | | |/ _` | | | | | |
| (_| | (_| | (_| | (_| | (__| |_| |_| | (_| | | | |_| |_
\__,_|\__,_|\__,_|\__,_|\___|\__|\__,_|\__,_|_|_|\__, ( )
|___/|/
*/
@andrewmartin
andrewmartin / node-download.js
Created April 10, 2014 08:09
Download files with node.js
var fs = require('fs'),
stub = require('./stub'),
_ = require('underscore'),
request = require('request');
// config for local file
var basePath = "images/",
data = stub.data,
urlRoot = "http://cdn.catalogs.com/";
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@hengkiardo
hengkiardo / gist:6491236
Created September 9, 2013 03:38
Download images with node.js
// npm install cheerio
// npm install request
function getImages(uri) {
var request = require('request');
var url = require('url');
var cheerio = require('cheerio');
path = require('path')
var fs = require('fs');
@maddievision
maddievision / midiin.c
Created September 6, 2013 21:22
MIDI Input Logger (OS X)
//Andrew Lim 2013-09-07
//Compile with: -framework CoreMIDI -framework CoreFoundation -framework CoreAudio
#include <stdio.h>
#include <CoreMIDI/CoreMIDI.h>
const char * const NOTE_NAMES[] = {
"C","C#","D","D#","E","F","F#","G","G#","A","A#","B"
};
@rainyear
rainyear / countdown
Last active June 28, 2016 01:08
javascript countdown
// set the date we're counting down to
var target_date = new Date("Aug 15, 2019").getTime();
// variables for time units
var days, hours, minutes, seconds;
// get tag element
var countdown = document.getElementById("countdown");
// update the tag with id "countdown" every 1 second