This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div> | |
<h1>Super Mario Maker <em>2</em> Bingo</h1> | |
<table></table> | |
<fieldset> | |
<legend>Options</legend> | |
<textarea rows=24></textarea> | |
<label>Seed <input type=number></label> | |
<button class=run>Let's Go</button> | |
<button class=reset>Start Over</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <Windows.h> | |
#include <string> | |
#include <codecvt> | |
// https://stackoverflow.com/questions/14762456/getclipboarddatacf-text | |
std::wstring GetClipboardText() | |
{ | |
// Try opening the clipboard | |
if (!OpenClipboard(nullptr)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static IReadOnlyCollection<T> TakeDescending<T, TKey>(IEnumerable<T> source, Func<T, TKey> keySelector, int count) | |
where TKey : IComparable<TKey> | |
{ | |
var index = 0; | |
var keys = new TKey[count]; | |
var values = new T[count]; | |
TKey min = default; | |
var minIndex = 0; | |
foreach (var item in source) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
var pairs = new (object, object)[] | |
{ | |
(new {}, new {}), | |
(new { a = 1 }, new { a = "1" }), | |
(new { a = "1", b = 2 }, new { a = 1 }), | |
(new { a = "1", c = 2 }, new { a = 1, c = 2 }), | |
(new { a = "1", c = new {} }, new { a = 1, c = new {} }), | |
(new { a = new { a = 1 } }, new { a = new {} }), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
std = { | |
-- these globals can be set and accessed. | |
globals = { "_init", "_draw", "_update", "_update60" }, | |
-- these globals can only be accessed. | |
read_globals = { | |
--[[ | |
copy( | |
`-- from ${location.href} ${(new Date()).toISOString()}\n` + | |
[].slice.call($('#WikiaMainContent').find('ul>li>a,.mw-headline')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void Main() | |
{ | |
// http://stackoverflow.com/questions/263400/what-is-the-best-algorithm-for-an-overridden-system-object-gethashcode | |
Demo(new { }, new { }); | |
Demo(null, new { }); | |
Demo(new { }, null); | |
Demo(new { a = 1 }, new { a = 1 }); | |
//new { _1 = HashInt(1), _2 = HashInt(2) }.Dump(); | |
Demo(new { a = 1 }, new { a = 2 }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 1. pay for all your photos | |
// 2. scroll through the entire album and ensure all previews have loaded | |
// 3. open dev tools | |
var stopDownloadPlease = false; | |
var downloadPlease = () => { setTimeout(() => {$(".icon-button.download").click(); setTimeout(() => { $(".arrow-next .icon.ng-binding.wdw.size-l.rotate-0").click(); if (!stopDownloadPlease) { downloadPlease() }; }, 4000)}, 700) }; | |
downloadPlease(); | |
// 4. watch downloads folder until duplicates start showing up (or some other way to make sure you got them all) | |
// 5. `stopDownloadPlease = true;` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright 2016 Cameron Jordan | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g mouse on | |
set-window-option -g mode-keys vi | |
bind-key -t vi-copy 'v' begin-selection | |
bind-key -t vi-copy 'y' copy-selection | |
set -g @batt_color_full_charge '#[fg=colour64]' #green | |
set -g @batt_color_high_charge '#[fg=colour64]' #green | |
set -g @batt_color_medium_charge '#[fg=colour136]' #orange | |
set -g @batt_color_low_charge '#[fg=colour160]' #red |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
There are only two hard problems in distributed systems: | |
2. Guaranteed order of messages | |
1. Exactly-once delivery | |
2. Guaranteed order of messages | |
*adapted from <https://twitter.com/mathiasverraes/status/632260618599403520>* |
NewerOlder