Skip to content

Instantly share code, notes, and snippets.

View JDillon522's full-sized avatar

Joseph Dillon JDillon522

View GitHub Profile
@JDillon522
JDillon522 / remove_git_history
Created February 16, 2016 17:22
Remove unwanted files from git history. Good for removing sensitive data or large files.
// create a bare copy
git clone <original git repo> —mirror
// do whatever magic filter-branch does
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch <file name>' \
--prune-empty --tag-name-filter cat -- —all
// add the new remote
git remote add upstream <new remote path>
// Push
git push upstream —mirror
@JDillon522
JDillon522 / debug.sh
Last active November 25, 2015 16:45
Ember App Debug
[ ] transform:number ........................................... undefined
[ ] transform:number ........................................... app/pods/number/transform
[ ] transform:number ........................................... undefined
[ ] transform:number ........................................... app/transforms/number
[ ] transform:number ........................................... undefined
Transition #0: signup: calling afterModel hook
Transition #0: signup.plans: calling beforeModel hook
[✓] route:signup/credentials ................................... app/pods/signup/credentials/route
[✓] route:signup/credentials ................................... app/pods/signup/credentials/route
[✓] route:signup/credentials ................................... app/pods/signup/credentials/route
@JDillon522
JDillon522 / gist:baa79eb1a4e47b06be60
Last active August 29, 2015 14:25
ember-cli-paypal schema
// Submit Credit Card Payment
// Method: POST
// url: v1/payments/payment
var schemea = {
"intent": "sale",
"payer": {
"payment_method": "credit_card",
"funding_instruments": [
{
"credit_card": {
{
"id": "caeb8545-5979-aca8-38cd-a5963a149a26",
"name": "PayPal",
"description": "",
"order": [
"b04e3fec-2fe9-5db4-8886-675b70a9bb0d",
"723884f2-6b68-bb43-e656-b078e2eec6d0"
],
"folders": [],
"timestamp": 1436553051701,
<!-- ACCESSIBILITY NAVIGATION -->
<div class="access">
<h1 id="top">Welcome to the University Website</h1>
<h2>Accessibility Navigation:</h2>
<ul>
<li><a href="#primary-navigation" title="Skip to the primary site navigation" class="skip">Skip to the primary site navigation</a></li>
<li><a href="#main" title="Skip to the main content" class="skip">Skip to the main content</a></li>
<li><a href="#footer" title="Skip to the footer" class="skip">Skip to the footer</a></li>
</ul>
</div><!-- /access -->
@JDillon522
JDillon522 / no-sudo.sh
Created September 27, 2014 07:43
How I stopped using sudo to NPM install -g
# A summation of stuff here : http://www.wenincode.com/installing-node-jsnpm-without-sudo/
# 1) Run:
which node
which npm
# - If you get a path after those commands, run:
sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}
# - Run the previous two commands again to ensure node and npm are gone