Skip to content

Instantly share code, notes, and snippets.

@bjf2015
bjf2015 / button-change-text.markdown
Created March 17, 2018 00:39
button-change-text
@bjf2015
bjf2015 / get-file-path.py
Created April 6, 2017 23:29
Obtains the current path to the file
def get_file_path(filename):
current_dir_path = os.getcwd()
file_path = os.path.join(os.getcwd(), filename)
print(file_path)
return file_path
get_file_path('choices.csv')
@bjf2015
bjf2015 / Go.txt
Created February 12, 2017 06:30
Code to begin flask app
go from here
var mongoose = require('mongoose');
var PostSchema = new mongoose.Schema({
title: String,
link: String,
upvotes: {type: Number, default: 0},
comments: [{ type: mongoose.Schema.Types.ObjectId, ref: 'Comment'}]
});
@bjf2015
bjf2015 / toggleClosest.js
Last active September 15, 2016 20:44
Alternate toggle solution
$('.shopping-list').find('.shopping-item__checked').closest("li").toggle();
@bjf2015
bjf2015 / 0_reuse_code.js
Created July 15, 2016 19:04
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console