I’m documenting for myself what I would look for in a validation library. The code I currently need it for is in Kotlin so I have the entire JVM ecosystem to choose from.
@import Darwin; | |
@import ObjectiveC; | |
@import CloudKit; | |
extern bool GEOConfigGetBOOL(int feature, void* something); | |
// Hooks feature flags in a resigned Maps.app to return true. | |
// Usage: | |
// clang -shared -fmodules -o libmaps_inject.dylib maps_inject.m \ | |
// "$(xcrun |
#!/bin/bash | |
set -e | |
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc) | |
hex=$((cat <<EOF | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> |
<?php | |
namespace App\Util\Doctrine\Repository; | |
use App\Util\Doctrine\Entity\AbstractEntity; | |
use Doctrine\Common\Persistence\ObjectRepository; | |
use Doctrine\ORM\EntityRepository; | |
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | |
use Symfony\Component\HttpKernel\Exception\UnprocessableEntityHttpException; |
import java.nio.ByteBuffer; | |
import java.util.UUID; | |
public class UuidAdapter { | |
public static byte[] getBytesFromUUID(UUID uuid) { | |
ByteBuffer bb = ByteBuffer.wrap(new byte[16]); | |
bb.putLong(uuid.getMostSignificantBits()); | |
bb.putLong(uuid.getLeastSignificantBits()); | |
return bb.array(); |
/** | |
* Returns the global object. | |
* Works even inside ES6 modules. | |
*/ | |
function getGlobalObject() { | |
// Workers don’t have `window`, only `self` | |
if (typeof self !== 'undefined') { | |
return self; | |
} | |
if (typeof global !== 'undefined') { |
// loop that generates margin ad padding helper classes | |
// the output is like .margin-5, .margin-top-5, margin-right-5 etc... | |
$properties: (margin, padding); | |
$sides: (top, right, bottom, left); | |
@each $prop in $properties { | |
@for $i from 1 through 14 { | |
.#{$prop}-#{$i*5} { | |
#{$prop}: #{$i*5}px !important; | |
} | |
@each $side in $sides { |
#!/usr/bin/env python3 | |
"""Simple HTTP Server With Upload. | |
This module builds on BaseHTTPServer by implementing the standard GET | |
and HEAD requests in a fairly straightforward manner. | |
see: https://gist.github.com/UniIsland/3346170 | |
""" | |
Hello, visitors! If you want an updated version of this styleguide in repo form with tons of real-life examples… check out Trellisheets! https://github.com/trello/trellisheets
“I perfectly understand our CSS. I never have any issues with cascading rules. I never have to use !important
or inline styles. Even though somebody else wrote this bit of CSS, I know exactly how it works and how to extend it. Fixes are easy! I have a hard time breaking our CSS. I know exactly where to put new CSS. We use all of our CSS and it’s pretty small overall. When I delete a template, I know the exact corresponding CSS file and I can delete it all at once. Nothing gets left behind.”
You often hear updog saying stuff like this. Who’s updog? Not much, who is up with you?
Native HTML controls are a challenge to style. You can style any element in the web platform that uses Shadow DOM with a pseudo element ::pseudo-element
or the /deep/
path selector.
video::webkit-media-controls-timeline {
background-color: lime;
}
video /deep/ input[type=range] {