Skip to content

Instantly share code, notes, and snippets.

@weissjeffm
weissjeffm / mysession.js
Last active January 5, 2021 16:50
Bitcoin private key sharing, with shamir's secret splitting using secrets.js and bitaddress.org
//init - not sure if necessary
secrets.setRNG()
secrets.init(3)
//encode
secrets.share(
ninja.publicKey.getHexFromByteArray(
Bitcoin.Base58.decode("5HyLghwYt9hGVZVSuSJwpj2tgfUqWqdVd2jy7ZC45m55b8zAKeN")),
4, 2)
//where "5H..." is the private key, 4 is the number of shares, 2 is the threshhold
@ccjeng
ccjeng / gist:5175351
Created March 16, 2013 07:11
SQL Server: get top 50 slow sql statement
--get top 50 slow sql statement
select top 50 * from
(
SELECT SUBSTRING(st.text, (qs.statement_start_offset/2)+1,
((CASE qs.statement_end_offset
WHEN -1 THEN DATALENGTH(st.text)
ELSE qs.statement_end_offset
END - qs.statement_start_offset)/2) + 1) AS StatementText,
last_execution_time as LastExecuted,
last_elapsed_time/1000000.0 as ElapsedTimeInSeconds,
@jackilyn
jackilyn / meta-tags.md
Created October 5, 2012 22:59 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content="your website's subject">
<meta name='copyright' content='company name'>

This allows you to use the following video streaming services outside of the US from your Mac without having to use a proxy or VPN, so no big bandwidth issues:

  • Hulu / HuluPlus
  • CBS
  • ABC
  • MTV
  • theWB
  • CW TV
  • Crackle
  • NBC
@mbostock
mbostock / .block
Last active November 22, 2022 23:32
Line Transition
license: gpl-3.0
@tomerd
tomerd / gauge.js
Last active April 21, 2024 21:08
google style gauges using javascript d3.js
function Gauge(placeholderName, configuration)
{
this.placeholderName = placeholderName;
var self = this; // for internal d3 functions
this.configure = function(configuration)
{
this.config = configuration;
@paulirish
paulirish / data-markdown.user.js
Last active June 27, 2025 05:29
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.