Skip to content

Instantly share code, notes, and snippets.

View cogell's full-sized avatar

B. Cedric Cogell cogell

View GitHub Profile
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active August 9, 2025 03:16
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@wsargent
wsargent / docker_cheat.md
Last active August 2, 2025 19:24
Docker cheat sheet
@jrdmcgr
jrdmcgr / docker-build.sh
Created February 7, 2014 14:59
Why won't docker build?
$ tree
.
├── Dockerfile
├── index.html
├── index.js
└── package.json
$ docker build .
Uploading context 6.144 kB
Uploading context
@kevingessner
kevingessner / gist:9509148
Last active April 27, 2023 15:45
Responsive emails that really work -- From Etsy's Code As Craft blog: http://codeascraft.com/2014/03/13/responsive-emails-that-really-work
<html>
<head>
<style type="text/css">
table table {
width: 600px !important;
}
table div + div { /* main content */
width: 65%;
float: left;
}
@addyosmani
addyosmani / README.md
Last active August 20, 2025 11:39 — forked from 140bytes/LICENSE.txt
108 byte CSS Layout Debugger

CSS Layout Debugger

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

@honkskillet
honkskillet / byte-sizetuts.md
Last active August 22, 2024 14:19
A series of golang tutorials with youtube videos.
@imjasonh
imjasonh / markdown.css
Last active January 3, 2025 20:15
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@paulirish
paulirish / what-forces-layout.md
Last active August 21, 2025 20:11
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent

Redux Chaos Monkey

This is a proof of concept which allows you to replay system events in a random order each time to make sure your UI can tolerate variable states.

I'm not sure if this is worthy of its on open source project with additional features like changing play back time, whitelisting/blacklisting actions etc but figured I'd put this out there to see if it piques anyones interest.

See a video of this in action here: [https://www.youtube.com/watch?v=wkoukONfwmA](Video on YouTube).

@lukestewart13
lukestewart13 / JsonConversion.scala
Last active May 11, 2017 20:29
Macro annotation to generate Play default JSON reads/writes in a case class companion object
import scala.annotation.StaticAnnotation
import scala.language.experimental.macros
import scala.reflect.macros.whitebox
class JsonReads extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro JsonConversion.readsImpl
}
class JsonWrites extends StaticAnnotation {
def macroTransform(annottees: Any*): Any = macro JsonConversion.writesImpl