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
<snippet> | |
<content><![CDATA[<% console.log(${1:}) %>]]></content> | |
<tabTrigger>%cl</tabTrigger> | |
<scope>text.html</scope> | |
<description>Underscore template console log</description> | |
</snippet> |
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
/// <summary> | |
/// Returns a 1x1 pixel Base64 encoded gif from the given image containing a single dominant color. | |
/// </summary> | |
/// <param name="source">The image this method extends.</param> | |
/// <returns>The <see cref="string"/></returns> | |
public static string ToBase64GifPixelString(this Image source) | |
{ | |
// Leave the original image intact | |
using (Image temp = new Image(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
.child-comments { | |
margin-left: 0px; | |
} |
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
body { | |
background: 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
body { | |
background: silver; | |
} |
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
{ | |
"summary": "Wow", | |
"urls": [ | |
"*.google.com/*" | |
], | |
"permissions": [ | |
"css" | |
] | |
} |
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
(function(){ | |
console.log('Bookmarklet loaded'); | |
var template = '*Outcome*\nGiven \nWhen \nThen \n\n*Todo*\n* \n\n*Dev notes*\n* '; | |
var $tab = document.querySelector('.menu-item[data-mode="source"]'); | |
var $text = document.querySelector('#description-wiki-edit .textarea'); | |
// There are 2 tabs, "Visual" and "Text". Click "Text" if it exists. | |
if ($tab && !$tab.classList.contains('active-tab')) { | |
$tab.querySelector('a').click(); |
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
(function() { | |
var currentLocation = location.href; | |
var currentLocationHasWww = currentLocation.indexOf('www.') !== -1; | |
var searchValue = currentLocationHasWww ? 'www.' : 'sandbox.'; | |
var replacement = currentLocationHasWww ? 'sandbox.' : 'www.'; | |
window.location = location.href.replace(searchValue, replacement); | |
})(); |
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
function getPlayerServing(totalScore = 0, numberOfServesEach = 2, numberOfPlayers = 2) { | |
return Math.floor((totalScore / numberOfServesEach)) % numberOfPlayers; | |
} | |
// Singles | |
// Player 1 = 0, Player 2 = 1 | |
getPlayerServing(11); | |
// Doubles | |
// Player 1 = 0, Player 2 = 1, Player 3 = 2, Player 4 = 3 |
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
handleDrop(evt, props) { | |
const itemToChange = this.state.find(id === props.id) | |
this.setState({ | |
items: itemTOChange | |
}); | |
} | |
<DragTarget onDrop={this.handleDrop}> |
OlderNewer