Skip to content

Instantly share code, notes, and snippets.

View mbifulco's full-sized avatar
🍱
Hungry (always)

Mike Bifulco mbifulco

🍱
Hungry (always)
View GitHub Profile
@maxim75
maxim75 / gist:1000135
Created May 31, 2011 08:02
GPX parsing with JavaScript
<!DOCTYPE html>
<html>
<head>
<style>
#map_canvas
{
width: 400px;
height: 400px;
}
</style>
@adamgit
adamgit / .gitignore
Last active April 8, 2024 12:58
.gitignore file for Xcode4 / OS X Source projects
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.6
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#
@adelevie
adelevie / account-controller.js
Last active December 2, 2017 13:11
Parse.com + Angular.js + Login (+ OAuth.js)
'use strict';
/**
* AccountController allows the User to change settings, link with their GitHub accounts, etc
*/
skeletonApp.controller('AccountController', [
'$scope', '$location', '$rootScope', 'OAuthService', 'ParseService', function($scope, $location, $rootScope, OAuthService, ParseService) {
// redirect to "/login" if user is not logged in
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@andrewpmiller
andrewpmiller / Lighttpd-Pi-Installation-Notes.md
Last active May 1, 2019 20:14
How to install Lighttp on a Rasberry Pi

Lighttpd - Installation and Setup for Raspberry Pi

Installation

sudo apt-get update && apt-get upgrade
sudo apt-get install lighttpd

Permissions

@mbifulco
mbifulco / function.js
Created August 25, 2015 19:10
jquery dictionary
//characters we want to replace:
/*
< with &lt;
> with &gt;
*/
var jsob =
@mbifulco
mbifulco / gist:2ad8529ca154d73c2d69
Created October 11, 2015 20:26
Open EdX certificate generation javascript
<p id="verify_button_by_clicking_msg">By clicking the button below, you assert that you have completed the course in its entirety.</p>
<p><input type=button value="Yes, I Agree." id="User_Verify_Button" style="margin-bottom: 20px;" /></p>
<p class="verify-button-success-text" style="font-weight: bold; color: #008200;"></p>
<script type="text/javascript">
var success_message = "Your grading and certification request has been received, <br />if you have passed, your certificate should be available in the next 20 minutes.";
var failure_message = "We're sorry; users who haven't created accounts and registered for the course may not receive Statements of Accomplishment.";
// for actual value of username, use scraped_username.split(':')[1].trim(); to get actual value
@rt2zz
rt2zz / excerpt.js
Created November 29, 2015 21:19
disable persistStore in node environment
if (typeof self === 'object') persistStore(store)
@Atlas7
Atlas7 / remove_postgres_on_mac_os.md
Last active March 23, 2023 13:02
Note - How completely uninstall PostgreSQL 9.X on Mac OSX

This blog post has helped me clean up my postgres development environment on Mac. So making a copy!

How completely uninstall PostgreSQL 9.X on Mac OSX

This article is referenced from stackoverflow:

If installed PostgreSQL with homebrew , enter brew uninstall postgresql

If you used the EnterpriseDB installer , follow the following step.
var userRef = ref.child(‘users/’ + userId);
var userTransactionsRef = ref.child(‘transactions/’ + userId);
Promise.all([
 userRef.once(‘value’),
 userTransactionsRef.once(‘value’)
]).then(function (snaps) {
 var user = snaps[0].val();
 var userTransactions = snaps[1].val();
});