Skip to content

Instantly share code, notes, and snippets.

@digitaljohn
digitaljohn / blade-runner.json
Created February 19, 2024 21:03
ComfyUI - Blade Runner SDXL
{
"last_node_id": 515,
"last_link_id": 983,
"nodes": [
{
"id": 287,
"type": "UpscaleModelLoader",
"pos": [
1431.1259058273588,
-981.1652146032301
@stephenhardy
stephenhardy / git-clearHistory
Created April 26, 2013 22:14
Steps to clear out the history of a git/github repository
-- Remove the history from
rm -rf .git
-- recreate the repos from the current content only
git init
git add .
git commit -m "Initial commit"
-- push to the github remote repos ensuring you overwrite history
git remote add origin git@github.com:<YOUR ACCOUNT>/<YOUR REPOS>.git
@gistlyn
gistlyn / ss-utils.js
Last active April 26, 2024 10:27
rewrite ss-utils.js to minimize allocations in IE
;(function (root, f) {
if (typeof exports === 'object' && typeof module === 'object')
module.exports = f(require("jquery"));
if (typeof define === "function" && define.amd)
define(["jquery"], f);
else if (typeof exports === "object")
f(require("jquery"));
else
f(root.jQuery);
})(this, function ($) {
@Decicus
Decicus / README.md
Last active April 26, 2024 10:26
A userscript for displaying the actual date & time (relative to local time) of when a Twitch clip was created.

Twitch clip datetime userscript

A userscript for displaying the actual date & time (relative to local time) of when a Twitch clip (and video) was created.

FYI: It only works on URLs that start with https://clips.twitch.tv/.
This script does not work with URLs that are on the Twitch "channel pages" (https://www.twitch.tv/CHANNEL_NAME_HERE/clip/...).
This has been added as of v0.5.0.

"Under the hood" the script uses Date.toLocaleString() to format the date. The format of the date & time may differ from the screenshots below.

/**
* Require the module at `name`.
*
* @param {String} name
* @return {Object} exports
* @api public
*/
function require(name) {
var module = require.modules[name];
@liveink
liveink / interview
Created October 16, 2011 11:54
interview
Andrew: Before we get started, this interview is sponsored by Fast Customer. You ever have to make a phone call, say, to your bank, but don’t want to wait on hold for half an hour until a real person gets on the phone? Well, with Fast Customer, you just do what I do. It’s right here on my iPhone and I’ve had it since it launched. You just type in the person you want to reach. In my case, I’m going to go CitiBank, Credit Card, Support. They will call them. They will get a person on the phone and then they’ll connect me. I don’t have to press one, or press zero, or do any of it, or wait on hold. I get to go back to work and they call me when the person is available to talk to me.
And I do this with AAA, if I needed to, and I did a few weeks ago. I do this with CitiBank, with tons of companies. Any company you want to reach, just about, is going to be in there. Go to fastcustomer.com and get the app right now for your iPhone or Android device. And, if you’re a company, and you don’t want to keep your people on h

Falsehoods programmers believe about prices

  1. You can store a price in a floating point variable.
  2. All currencies are subdivided in 1/100th units (like US dollar/cents, euro/eurocents etc.).
  3. All currencies are subdivided in decimal units (like dinar/fils)
  4. All currencies currently in circulation are subdivided in decimal units. (to exclude shillings, pennies) (counter-example: MGA)
  5. All currencies are subdivided. (counter-examples: KRW, COP, JPY... Or subdivisions can be deprecated.)
  6. Prices can't have more precision than the smaller sub-unit of the currency. (e.g. gas prices)
  7. For any currency you can have a price of 1. (ZWL)
  8. Every country has its own currency. (EUR is the best example, but also Franc CFA, etc.)
@liveink
liveink / gdoc2xml.xml
Created March 2, 2012 02:15
gdoc to xml
<?xml version="1.0" encoding="UTF-8"?>
<Module>
<ModulePrefs title="Spreadsheets Converter"
description="This gadget will convert spreadsheet data to either JSON, XML, or SQL INSERT statements. The user must specify a range that includes column headers, but it can have any amount of columns or rows."
author="Pamela Fox"
author_affiliation="Google Inc."
author_email="pamela.fox+coolgadget@gmail.com"
screenshot="http://pamela.fox.googlepages.com/screenshot_spreadsheetsconverter.jpg"
thumbnail="http://pamela.fox.googlepages.com/thumbnail_spreadsheetconverter.jpg" >
<Require feature="idi"/>
// parseUri 1.2.2
// (c) Steven Levithan <stevenlevithan.com>
// MIT License
function parseUri (str) {
var o = parseUri.options,
m = o.parser[o.strictMode ? "strict" : "loose"].exec(str),
uri = {},
i = 14;
@paulmkoch
paulmkoch / SoundCloud Custom Tracking File
Created May 15, 2014 17:17
SoundCloud Custom Tracking File
<script>
(function(){var requirejs,require,define,__inflate;(function(e){function a(e,t){var n=t&&t.split("/"),i=r.map,s=i&&i["*"]||{},o,u,a,f,l,c,h;if(e&&e.charAt(0)==="."&&t){n=n.slice(0,n.length-1),e=n.concat(e.split("/"));for(l=0;h=e[l];l++)if(h===".")e.splice(l,1),l-=1;else if(h===".."){if(l===1&&(e[2]===".."||e[0]===".."))return!0;l>0&&(e.splice(l-1,2),l-=2)}e=e.join("/")}if((n||s)&&i){o=e.split("/");for(l=o.length;l>0;l-=1){u=o.slice(0,l).join("/");if(n)for(c=n.length;c>0;c-=1){a=i[n.slice(0,c).join("/")];if(a){a=a[u];if(a){f=a;break}}}f=f||s[u];if(f){o.splice(0,l,f),e=o.join("/");break}}}return e}function f(t,n){return function(){return u.apply(e,s.call(arguments,0).concat([t,n]))}}function l(e){return function(t){return a(t,e)}}function c(e){return function(n){t[e]=n}}function h(r){if(n.hasOwnProperty(r)){var s=n[r];delete n[r],i[r]=!0,o.apply(e,s)}if(!t.hasOwnProperty(r))throw new Error("No "+r);return t[r]}function p(e,t){var n,r,i=e.indexOf("!");return i!==-1?(n=a(e.slice(0,i),t),e=e.slice(i+1),r=