Skip to content

Instantly share code, notes, and snippets.

View goodstress's full-sized avatar
🏠
Working from home

goodstress

🏠
Working from home
  • Portland Oregon
View GitHub Profile
@linuxsimba
linuxsimba / docker-compose.yml
Last active May 3, 2024 15:53
docker-compose for MongoDB and Mongoose UI
version: '2'
networks:
mongodb_net:
driver: bridge
ipam:
driver: default
config:
# Change this subnet range if it conflicts with your personal/work network
- subnet: 192.168.213.0/24
@Ghost---Shadow
Ghost---Shadow / plag.py
Created December 11, 2015 05:01
Using NLTK to replace all words in a string with their synonyms.
from nltk.corpus import wordnet
from nltk.tokenize import word_tokenize
from random import randint
import nltk.data
# Load a text file if required
text = "Pete ate a large cake. Sam has a big mouth."
output = ""
# Load the pretrained neural net
@elmariachi111
elmariachi111 / createBearerToken.js
Last active January 13, 2020 15:44
A Javascript file that requests a Twitter bearer token for application only authentication (https://dev.twitter.com/docs/auth/application-only-auth). Depends on mikeals request library (https://github.com/mikeal/request) (npm install request)
var R = require("request");
var key = process.env.TWITTER_CONSUMER_KEY;
var secret = process.env.TWITTER_CONSUMER_SECRET;
var cat = key +":"+secret;
var credentials = new Buffer(cat).toString('base64');
var url = 'https://api.twitter.com/oauth2/token';
R({ url: url,
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active June 18, 2024 18:27
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh