A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
using System.Runtime.InteropServices; | |
using System; | |
using System.Numerics; | |
using System.Threading; | |
namespace MouseMinder | |
{ | |
/*************** | |
* John Henckel, jdhenckel@gmail.com 1 OCT 2020 | |
* |
// START WIN7 | |
// MARGINS class for WIN7 Frame | |
public class MARGINS extends Structure implements Structure.ByReference { | |
public int cxLeftWidth; | |
public int cxRightWidth; | |
public int cyTopHeight; | |
public int cyBottomHeight; | |
@Override |
import com.google.gson.*; | |
import org.bukkit.Bukkit; | |
import org.bukkit.Location; | |
import org.bukkit.World; | |
import java.lang.reflect.Type; | |
/** | |
* A gson adapter for {@link org.bukkit.Location}. | |
* <p> |
function sec2time(timeInSeconds) { | |
var pad = function(num, size) { return ('000' + num).slice(size * -1); }, | |
time = parseFloat(timeInSeconds).toFixed(3), | |
hours = Math.floor(time / 60 / 60), | |
minutes = Math.floor(time / 60) % 60, | |
seconds = Math.floor(time - minutes * 60), | |
milliseconds = time.slice(-3); | |
return pad(hours, 2) + ':' + pad(minutes, 2) + ':' + pad(seconds, 2) + ',' + pad(milliseconds, 3); | |
} |
package com.comphenix.example; | |
import java.io.ByteArrayInputStream; | |
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import org.bukkit.Bukkit; | |
import org.bukkit.inventory.Inventory; | |
import org.bukkit.inventory.ItemStack; | |
import org.bukkit.util.io.BukkitObjectInputStream; |
#include <Adafruit_NeoPixel.h> | |
#define PIN 1 | |
#define STRIPSIZE 16 | |
// Parameter 1 = number of pixels in strip | |
// Parameter 2 = pin number (most are valid) | |
// Parameter 3 = pixel type flags, add together as needed: | |
// NEO_KHZ800 800 KHz bitstream (most NeoPixel products w/WS2812 LEDs) | |
// NEO_KHZ400 400 KHz (classic 'v1' (not v2) FLORA pixels, WS2811 drivers) |
// Just before switching jobs: | |
// Add one of these. | |
// Preferably into the same commit where you do a large merge. | |
// | |
// This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
// and then it quickly escalated into more and more evil suggestions. | |
// I've tried to capture interesting suggestions here. | |
// | |
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
using UnityEngine; | |
using UnityEditor; | |
public class AutoSnap : EditorWindow | |
{ | |
private Vector3 prevPosition; | |
private bool doSnap = true; | |
private float snapValue = 1; | |
[MenuItem( "Edit/Auto Snap %_l" )] |
var fs = require('fs'); | |
var lame = require('lame'); | |
var Speaker = require('speaker'); | |
fs.createReadStream(process.argv[2]) | |
.pipe(new lame.Decoder()) | |
.on('format', function (format) { | |
this.pipe(new Speaker(format)); | |
}); |