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
# there are a few different ways to copy data from one redis instance to another | |
# from what i've read, you can set up your new instance as a slave to the old | |
# and let redis replication do its thing | |
# or, it seems you can copy the underlying dump data from one instance's file system to the other's | |
# however, sometimes you don't manage your own redis instances, or maybe you just don't want to bother | |
# with any of that. you could just copy the data. | |
# this script does that. | |
# there were some other scripts online already | |
# - https://github.com/jeremyfa/node-redis-dump | |
# - https://github.com/yaauie/redis-copy |
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
var scr = document.createElement("script"); | |
scr.src = "https://code.jquery.com/jquery-3.5.1.slim.min.js"; | |
document.body.appendChild(scr); | |
$(document.body).click(function(event){ | |
event.preventDefault(); | |
alert("i'm sorry but you can't do that. better luck next time") | |
}); |
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
/*! accepts event names and prints out time interval (seconds) since last event given */ | |
struct Benchmarker { | |
struct Event { | |
let time: NSDate | |
let name: String | |
} | |
static var events = [Event]() | |
static let prefix = "--------\n--------\n--------\nBENCHMARK\n--------\n--------\n--------\n" |