brew install redis
Set up launchctl to auto start redis
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
/usr/local/opt/redis/
is a symlink to /usr/local/Cellar/redis/x.y.z
(e.g., 2.8.7
)
# Thanks to tenderlove on Peepcode play by play | |
require 'digest/md5' | |
def fetch username | |
records = JSON.parse get username | |
records.each do |hash| | |
checksum = Digest::MD5.hexdigest Marshal.dump(hash) | |
hash['checksum'] = checksum | |
end |
require 'rails_helper' | |
RSpec.describe MyWorker, type: :job do | |
include ActiveJob::TestHelper | |
let(:sqs_msg) { double AWS::SQS::ReceivedMessage, | |
id: 'fc754df7-9cc2-4c41-96ca-5996a44b771e', | |
body: 'test', | |
delete: nil } | |
/* | |
* Handling Errors using async/await | |
* Has to be used inside an async function | |
*/ | |
try { | |
const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
// Success 🎉 | |
console.log(response); | |
} catch (error) { | |
// Error 😨 |
check file slave_running with path /opt/slave_running | |
if timestamp > 3 minutes then alert |
Primary differences between SSH and HTTPS. This post is specifically about accessing Git repositories on GitHub.
plain Git, aka git://github.com/
Does not add security beyond what Git itself provides. The server is not verified.
If you clone a repository over git://, you should check if the latest commit's hash is correct.