Skip to content

Instantly share code, notes, and snippets.

@cwarden
cwarden / NPI Importer.go
Created Sep 13, 2017 — forked from ewhitebloom/NPI Importer.go
ETL NPI data from NPI CSV file to MySQL.
View NPI Importer.go
package main
import (
"bufio"
"database/sql"
"fmt"
_ "github.com/go-sql-driver/mysql"
"os"
"reflect"
"strconv"
@cwarden
cwarden / config.json
Last active Feb 16, 2016 — forked from anonymous/config.json
Bootstrap Customizer Config
View config.json
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
View keybase.md

Keybase proof

I hereby claim:

  • I am cwarden on github.
  • I am cwarden (https://keybase.io/cwarden) on keybase.
  • I have a public key whose fingerprint is CB1F D04D A7F8 4780 4C8D 1CE8 5D22 7839 4EF7 97A0

To claim this, I am signing this object:

@cwarden
cwarden / Toogle New Components
Last active Dec 22, 2015
A bookmarklet to toggle between all components and new components in Salesforce's packaging page. Visit http://jsfiddle.net/cwarden/Vzm2s/embedded/result/ for link to drag to bookmark bar.
View Toogle New Components
javascript:(function(e,a,g,h,f,c,b,d){if(!(f=e.jQuery)||g>f.fn.jquery||h(f)){c=a.createElement("script");c.type="text/javascript";c.src="//ajax.googleapis.com/ajax/libs/jquery/"+g+"/jquery.min.js";c.onload=c.onreadystatechange=function(){if(!b&&(!(d=this.readyState)||d=="loaded"||d=="complete")){h((f=e.jQuery).noConflict(1),b=1);f(c).remove()}};a.documentElement.childNodes[0].appendChild(c)}})(window,document,"1.8.3",function($,L){(function() { if ($('.dataRow:hidden').length) { $('.dataRow').show(); } else { $('.dataRow').hide(); $('.dataRow td:nth-child(7):empty').add('.dataRow td:nth-child(7):contains("N/A")').parent(':has(td:nth-child(8):empty)').show(); }})()});
View debounce.js
/* Takes a function that optionally returns a promise, and debounces it, returning a
* promise to all callers. When the debounced function fulfills its promise or
* returns a non-promise, all callers get the result.
* Example: http://bit.ly/1btZC4f
*/
var debounce = function(func, wait, immediate) {
var timeout;
var deferred = $.Deferred();
return function() {
var context = this, args = arguments;
View woopra cors
$ curl -i -X OPTIONS http://www.woopra.com/rest/search
HTTP/1.0 200 OK
Access-Control-Allow-Headers: Content-Type, X-Api-Version, X-Access-Id, X-Access-Secret
Access-Control-Allow-Origin: *
Date: Mon, 25 Feb 2013 23:59:34 GMT
Content-Length: 0
Access-Control-Allow-Methods: POST, GET, OPTIONS
Content-Type: application/javascript
View validateSignedRequest.php
<?php
function validateSignedRequest($signedRequest, $key) {
list($signature, $payload) = explode('.', $signedRequest);
$hmac = base64_encode(hash_hmac('sha256', $payload, $key, true));
return $signature == $hmac;
}
@cwarden
cwarden / emoji_sad.txt
Created Nov 27, 2012 — forked from mranney/emoji_sad.txt
Why we can't process Emoji anymore
View emoji_sad.txt
From: Chris DeSalvo <chris.desalvo@voxer.com>
Subject: Why we can't process Emoji anymore
Date: Thu, 12 Jan 2012 18:49:20 -0800
Message-Id: <AE459007-DF2E-4E41-B7A4-FA5C2A83025F@voxer.com>
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
charset=utf-8
View gist:3840968
# filtering logs
./platform-tools/adb logcat 'dalvikvm:S AmazonEmail:S NotificationService:S IconMerger:S dalvikvm-heap:S v8:S DeviceStorageMonitorService:S'
# dealing with device not found
./platform-tools/adb kill-server
./platform-tools/adb start-server
@cwarden
cwarden / table.html
Created Jul 11, 2012 — forked from dunhamsteve/table.html
Example of a scrollable table that only renders visible rows
View table.html
<html>
<style type="text/css" media="screen">
#table {
position: absolute;
top: 30px;
bottom: 0;
left: 10px;
right: 10px;
}
#header {
You can’t perform that action at this time.