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
#!/usr/bin/perl -w | |
# recover rsyslog disk queue index (.qi) from queue files (.nnnnnnnn). | |
# | |
# See: | |
# runtime/queue.c: qqueuePersist() | |
# runtime/queue.c: qqueueTryLoadPersistedInfo() | |
# | |
# [email protected] 2012-03-14 | |
# | |
use strict; |
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
resource "aws_iam_user" "asg_healthreport" { | |
name = "${var.stack}-asg_healthreport" | |
# can't use create_before_destroy due to fixed name | |
} | |
resource "aws_iam_access_key" "asg_healthreport" { | |
user = "${aws_iam_user.asg_healthreport.name}" | |
# can't use create_before_destroy due to fixed name of user | |
} |
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
// Double all numbers | |
> Promise.map([1, 2, 3], function(num) { return num * 2; }).then(function(numbers) { console.log("The final list of numbers:", numbers); }) | |
The final list of numbers: [ 2, 4, 6 ] | |
// Remove all the odd numbers | |
> Promise.filter([1, 2, 3], function(num) { return (num % 2) == 0; }).then(function(numbers) { console.log("The final list of numbers:", numbers); }) | |
The final list of numbers: [ 2 ] | |
// Sum all the numbers | |
> Promise.reduce([1, 2, 3], function(total, num) { return total + num; }, 0).then(function(number) { console.log("The final value:", number); }) |
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
/** | |
* The cicada principle in animations | |
* Remember the cicada principle that used prime numbers to make multiple overlaid repeated backgrounds seem more random? | |
* There’s no reason it can’t be applied to repeating linear animations too (using primes for the durations, divided by 10) | |
*/ | |
@keyframes spin { to { transform: rotate(1turn); } } | |
@keyframes radius { 50% { border-radius: 50%; } } | |
@keyframes color { 50% { color: orange; } } | |
@keyframes width { 50% { border-width: .3em; } } |
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
#! /usr/bin/env python2 | |
# Requires: PIL, colormath | |
# | |
# Improved algorithm now automatically crops the image and uses much | |
# better color matching | |
from PIL import Image, ImageChops | |
from colormath.color_objects import RGBColor | |
import argparse | |
import math |
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
.parallax-image { | |
background: url() repeat center center fixed; | |
background-clip: padding-box; | |
} |
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
/** | |
* Circular Tooltip (SO) | |
* http://stackoverflow.com/q/13132864/1397351 | |
*/ | |
* { margin: 0; padding: 0; } | |
body { | |
overflow: hidden; | |
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg); | |
} | |
/* generic styles for button & circular menu */ |
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
/** | |
* Scrolling shadows by @kizmarh and @leaverou | |
* Only works in browsers supporting background-attachment: local; & CSS gradients | |
* Degrades gracefully | |
*/ | |
html { | |
background: white; | |
font: 120% sans-serif; | |
} |
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
/* CSS States */ | |
body { | |
background: url(http://dabblet.com/img/noise.png); | |
background-color: #F5F2F0; | |
font-family: Georgia, serif; | |
font-size: 18px; | |
line-height: 1.6em; | |
text-shadow: 0 2px 0 white; | |
color: #222; | |
} |
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
/** | |
* Text masking — The SVG way | |
*/ | |
svg { | |
width: 6em; height: 1.5em; | |
font: 900 500%/1.2 'Arial Black', sans-serif; | |
} | |
text { fill: url(#wood); } |
NewerOlder