diskutil erasevolume hfsx 'RAM Disk' `hdiutil attach -nomount ram://2097152`
Reference: http://www.tekrevue.com/tip/how-to-create-a-4gbs-ram-disk-in-mac-os-x/
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
diskutil erasevolume hfsx 'RAM Disk' `hdiutil attach -nomount ram://2097152`
Reference: http://www.tekrevue.com/tip/how-to-create-a-4gbs-ram-disk-in-mac-os-x/
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
#! /usr/bin/python | |
# Copyright (c) 2015, Rethink Robotics, Inc. | |
# Using this CvBridge Tutorial for converting | |
# ROS images to OpenCV2 images | |
# http://wiki.ros.org/cv_bridge/Tutorials/ConvertingBetweenROSImagesAndOpenCVImagesPython | |
# Using this OpenCV2 tutorial for saving Images: | |
# http://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_image_display/py_image_display.html |
var target = "YOUR GITHUB WEBHOOK JSON"; | |
var key = "GITHUB WEBHOOK SECRET"; | |
var data = System.Text.Encoding.UTF8.GetBytes(target); | |
var keyData = System.Text.Encoding.UTF8.GetBytes(key); | |
using (var hmac = new System.Security.Cryptography.HMACSHA1(keyData)) | |
{ | |
var bs = hmac.ComputeHash(data); | |
var sha1 = System.BitConverter.ToString(bs).ToLower().Replace("-",""); | |
Console.WriteLine($"YOUR WEBHOOK JSON HASH (SHA1) is : {sha1}"); |
#!/usr/bin/env python3 | |
import hashlib | |
import os | |
import struct | |
import sys | |
import zlib | |
def blob_id(blob): |