Install Redis RDB Tools from here:
Take a snapshot of each redis db
$ redis-cli save
Copy the snapshots to somewhere else
$ cp ~/dump.rdb ./dump-a.rdb
<div class="youtube-section" id="video-{{ youtube_id }}"> | |
<div class="youtube-container"> | |
<div class="youtube-watermark"> | |
{{ theme:output src="svg/uga-college-logo-white.svg" }} | |
</div> | |
<div class="youtube-player" data-id="{{ youtube_id }}"></div> | |
{{ if video_title || video_description }} | |
<div class="row padd-top-default"> | |
<article> | |
{{ if video_title }} |
Install Redis RDB Tools from here:
Take a snapshot of each redis db
$ redis-cli save
Copy the snapshots to somewhere else
$ cp ~/dump.rdb ./dump-a.rdb
#include <Adafruit_NeoPixel.h> | |
#include "WS2812_Definitions.h" | |
#define PIN_A 9 | |
#define PIN_B 3 | |
#define PIN_C 2 | |
#define PIN_D 12 | |
#define PIN_E 10 | |
#define PIN_F 6 | |
#define LED_COUNT 43 |
#import <Foundation/Foundation.h> | |
@interface JNWThrottledBlock : NSObject | |
// Runs the block after the buffer time _only_ if another call with the same identifier is not received | |
// within the buffer time. If a new call is received within that time period the buffer will be reset. | |
// The block will be run on the main queue. | |
// | |
// Identifier and block must not be nil. | |
+ (void)runBlock:(void (^)())block withIdentifier:(NSString *)identifier throttle:(CFTimeInterval)bufferTime; |
#! /usr/bin/env python | |
"""{escher} -- one-file key-value storage. | |
What? | |
This is a toy application to manage persistent key-value string data. | |
The file {escher} is *both* the application and its data. | |
When you run any of the commands below, the file will be executed and, | |
after data change, it will rewrite itself with updated data. | |
You can copy the file with whatever name to create multiple datasets. |
#include <stdio.h> | |
#define GO puts | |
#define THE ( | |
#define FUCK "GO THE FUCK TO SLEEP" | |
#define TO ); | |
#define SLEEP return 0 | |
int main() | |
{ | |
GO THE FUCK TO SLEEP; | |
} |
Using Python's built-in defaultdict we can easily define a tree data structure:
def tree(): return defaultdict(tree)
That's it!
# An API keys script written by Patrick Gibson (@patr1ck) and Christopher Bowns (@cbowns) | |
# This script sets API keys in your app's Info.plist from an .api_keys file you keep in your home directory (~/.api_keys) | |
# This allows you to not check API keys into your source control system, | |
# or for different developers to use different keys without needing to patch their working copies. | |
# Installation directions: | |
=begin | |
1. Create a Run Script build phase in your Xcode project before Compile Sources | |
2. Copy and paste this whole script in. | |
3. Create or modify your .api_keys file to hold your API keys |
From: Chris DeSalvo <[email protected]> | |
Subject: Why we can't process Emoji anymore | |
Date: Thu, 12 Jan 2012 18:49:20 -0800 | |
Message-Id: <[email protected]> | |
--Apple-Mail=_6DEAA046-886A-4A03-8508-6FD077D18F8B | |
Content-Transfer-Encoding: quoted-printable | |
Content-Type: text/plain; | |
charset=utf-8 |
''' | |
given a Model with: | |
category = models.CharField(max_length=32, choices=CATEGORY_CHOICES) | |
pubdate = models.DateTimeField(default=datetime.now) | |
<other fields> | |
Fetch the item from each category with the latest pubdate. | |
''' |