Skip to content

Instantly share code, notes, and snippets.

View dcpesses's full-sized avatar

Danny Pesses dcpesses

View GitHub Profile
@stefansundin
stefansundin / make-chrome-app.sh
Last active May 16, 2024 07:39
Create Chrome apps in Mac OS.
#!/bin/sh
# wget https://gist.githubusercontent.com/stefansundin/c89fd15bae5a58831790/raw/make-chrome-app.sh
# chmod +x make-chrome-app.sh
# ./make-chrome-app.sh
echo "Note that the app will run with a separate data dir and thus not have your regular extensions and settings."
echo
echo "What should the app be called?"
read name
echo
@cmawhorter
cmawhorter / proxy.js
Created June 26, 2014 05:36
Node script to forward all http requests to another server and return the response with an access-control-allow-origin header. Follows redirects.
// Simple proxy/forwarding server for when you don't want to have to add CORS during development.
// Usage: node proxy.js
// Open browser and navigate to http://localhost:9100/[url]
// Example: http://localhost:9100/http://www.google.com
// This is *NOT* for anything outside local development. It has zero error handling among other glaring problems.
// This started as code I grabbed from this SO question: http://stackoverflow.com/a/13472952/670023
@alexandrevicenzi
alexandrevicenzi / index.html
Last active September 22, 2020 21:01
Bootstrap CSS Animate Loading Icon Button
<!-- Code snippet -->
<div class="form-group">
<div class="col-md-12 text-center">
<span class="glyphicon glyphicon-refresh glyphicon-refresh-animate"></span>
</div>
</div>
@kevinelliott
kevinelliott / osx-10.10-setup.md
Last active December 1, 2023 08:21
Mac OS X 10.10 Yosemite Setup

Mac OS X 10.10 Yosemite

Custom recipe to get OS X 10.10 Yosemite running from scratch, setup applications and developer environment. I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

Install Software

@TylerFisher
TylerFisher / LICENSE
Last active March 22, 2020 11:26
A basic library and example usage for JavaScript-based Chromecast apps, developed by NPR Visuals for elections.npr.org.
The MIT License (MIT)
Copyright (c) 2014 NPR
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@velsa
velsa / gist:d0ba3b02514e302687cb
Created November 30, 2014 18:04
EventPlayer
/** @jsx React.DOM */
var EventPlayer = React.createClass({
componentDidUpdate: function() { this.update_player(); },
componentDidMount: function() {
var self = this;
self.update_player();
$(window).on('resize', function(){
self.resize_player();
});
@anaisbetts
anaisbetts / analytics.js
Created January 7, 2015 20:47
Google Analytics in Atom Shell
// Pretend that cookies work
(function (document) {
var cookies = {};
document.__defineGetter__('cookie', function () {
var output = [];
for (var cookieName in cookies) {
output.push(cookieName + "=" + cookies[cookieName]);
}
return output.join(";");
});
@vimes1984
vimes1984 / contact form 7 to sales force
Last active September 20, 2016 00:22
this is an update to this function which is a little outdated now: http://daddyanalytics.com/integrating-contact-form-7-and-salesforce/
<?php
/**
* Sales force integration
*/
add_action( 'wpcf7_before_send_mail', 'my_conversion' );
function my_conversion( $cf7 ){
ob_start(); // start buffer capture
# With a little help from http://www.raspberrypi.org/forums/viewtopic.php?f=78&t=85041
sudo raspi-config
# Expand Filesystem
# Advanced Options -> Audio -> Change to 3.5 Headphone
# Internationalisation Options
sudo reboot
# if locale errors show up,
sudo dpkg-reconfigure locales
# Uncheck en_UK.UT8
# Check en_US.UTF8