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
var util = require('util') | |
, Transform = require('stream').Transform | |
, StreamCombiner = require('./streamcombiner'); | |
var chunks1 = []; | |
var stream1 = new Transform(); | |
var soFar = ''; | |
stream1._transform = function(chunk, encoding, done) { | |
chunks1.push(chunk.toString()); | |
var pieces = (soFar + chunk).split('\n'); |
#include <string.h> | |
#include <ctype.h> | |
#include <SoftwareSerial.h> | |
// the Bluetooth Shield connects to Pin D9 & D10 | |
SoftwareSerial bt(9,10); | |
const uint8_t req[5] = {0x00, 0x01, 0x00, 0x11, 0x00}; | |
const uint8_t cap[17] = {0x00, 0x0d, 0x00, 0x11, 0x01, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x32}; | |
const uint8_t ping[9] = {0x00, 0x05, 0x07, 0xd1, 0x00, 0xde, 0xad, 0xbe, 0xef}; |
// Simple script that exports a users "Saved For Later" list out of Feedly | |
// as a JSON string. | |
// | |
// This was intended for use in the Google Chrome's "Inspector" tool so your | |
// mileage may vary if used in other contexts. | |
// | |
// Format of JSON is as follows: | |
// [ | |
// { | |
// title: "Title", |
<?php | |
namespace AmceBundle\Command; | |
class MyCommand | |
{ | |
// ... | |
protected function execute(InputInterface $input, OutputInterface $output) | |
{ |
<?php | |
define ('DSN_REGEX', '/^((?P<driver>\w+):\/\/)?((?P<user>\w+)?(:(?P<password>\w+))?@)?((?P<adapter>\w+):)?((host=(?P<host>[\w-\.]+))|(unix_socket=(?P<socket_file>[\w\/\.]+)))(:(?P<port>\d+))?((;dbname=|\/)(?P<database>[\w\-]+))?$/Uim'); |
FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.
package main | |
import ( | |
"bytes" | |
"fmt" | |
"io" | |
"os" | |
"strings" | |
) |
import requests | |
import json | |
import time | |
API_KEY = "" | |
API_TOKEN = "" | |
table_id = "" | |
url = "https://api.trello.com/1/boards/{}/cards/closed/?key={}&token={}".format(table_id, API_KEY, API_TOKEN) |
Adapted from caddy systemd Service Unit
The provided file should work with systemd version 219 or later. It might work with earlier versions.
The easiest way to check your systemd version is to run systemctl --version
.
We will assume the following: