A Pen created on CodePen.io. Original URL: https://codepen.io/jhnsnc/pen/PmJggb.
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
/** | |
* Conditionally add/remove classes and render the result to a class list string | |
* | |
* @param {...string} initialClasses - initial class names to add | |
*/ | |
export class ClassNames { | |
constructor(...initialClasses) { | |
this.arrClasses_ = initialClasses; | |
this.breakUpSpaces_(); | |
return this; |
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
#------------------------------------------------------------------------------- | |
# Install NVM | |
#------------------------------------------------------------------------------- | |
echo -e "Installing nvm, our Node version manager..." true | |
NVM_DIR="$HOME/.nvm" | |
if [[ -e "$NVM_DIR" ]]; then | |
echo -e "Already installed. Moving on..." |
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
// Sineless hash - Dave Hoskins ( https://www.shadertoy.com/view/4djSRW ) | |
// License: CC BY-SA v4.0 (this function only) | |
float hash11(float p) | |
{ | |
const float HASHSCALE1 = .1031; | |
vec3 p3 = fract(vec3(p) * HASHSCALE1); | |
p3 += dot(p3, p3.yzx + 19.19); | |
return fract((p3.x + p3.y) * p3.z); | |
} |
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 colorInterpolate(t) { | |
var color1 = 0xffcc00; | |
var color2 = 0x0066ff; | |
var r = Math.floor((color2>>16)*t + (color1>>16)*(1-t)); | |
var g = Math.floor((color2>>8&0xff)*t + (color1>>8&0xff)*(1-t)); | |
var b = Math.floor((color2&0xff)*t + (color1&0xff)*(1-t)); | |
return '#' + ((1<<24)+(r<<16)+(g<<8)+b).toString(16).slice(1); | |
} |
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
// Written by Chris Johnson | |
// 2013-07-21 | |
// Assumes jQuery is available as `$` | |
/* | |
* USAGE | |
* spritify($(element), { //should already have spritesheet set as background | |
* spriteSheetWidth: 300, //width of spritesheet | |
* spriteSheetHeight: 150, //height of spritesheet | |
* offsetX: 0, //offset applied to each frame |
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
javascript:var c=0;Array.prototype.forEach.call(document.querySelectorAll('.tweet[data-user-id="371635567"]'),function(t){t.parentNode.remove(),c+=1}),window.alert('Removed '+c+' Bum tweets.'); | |
/** | |
* USAGE: Create a new bookmark in your browser. | |
* Copy/Paste the entire line above into the URL/location field. | |
* Name the bookmarklet something like "Remove Bum Tweets". | |
* Click the bookmarklet you created when you're on Twitter.com and feeling overwhelmed with tweets from @Worthless_Bums. | |
*/ |
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
# EditorConfig helps developers define and maintain consistent | |
# coding styles between different editors and IDEs | |
# editorconfig.org | |
root = true | |
[*] | |
# Change these settings to your own preference | |
indent_style = space |
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
{ | |
"description": "The settings in this file are persisted server-side. This file is generated automatically. Editing it is not recommended. Modify SettingsToPersist.json to specify which settings are persisted.", | |
"files": [ | |
{ | |
"name": "Game.cfg", | |
"sections": [ | |
{ | |
"name": "Chat", | |
"settings": [ | |
{ |
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
<?xml version="1.0" encoding="UTF-8" standalone="no" ?> | |
<UI> | |
<Version Value="1.0"/> | |
<!-- this is the part that actually matters (also, remove this line) --> | |
<Aliases> | |
<Alias String=";black" Value="<rgb=#000000>"/> | |
<Alias String=";blue" Value="<rgb=#1050FF>"/> | |
<Alias String=";gold" Value="<rgb=#FFD700>"/> |
NewerOlder