time.google.com
time1.google.com
time2.google.com
time3.google.com
Encrypted systems (desktops/laptops) have one major problem when it comes to providing security over protected files. When you sit in front of your machine, you can feel safe because no one can break into the system without your knowledge. Moreover, if they try to do some bad actions, you can detect them and avoid the imminent danger. But what if you leave your laptop alone? Even if you think that you can lock it, turn it off or hibernate it, the machine still isn't secure as you would have thought. The problem lays in the physical access that people can get when you're not around and hence set some traps for you when you're not looking. To avoid the danger that comes
// This gist contains JavaScript functions and tests for: | |
// - conversion from gamma-corrected (or gamma-compressed) sRGB to linear RGB, to Oklab | |
// - interpolation through Oklab | |
// - conversion back to linear RGB, then sRGB | |
// To use these tests, install nodejs, save this file locally, and run with: | |
// node OklabExperiments.js | |
// No other dependencies are required to use this. | |
// Thanks to some helpful folks in the generative art community for helping me better understand what's happening with this. | |
// My toddler smacked the keyboard with a piece of cardboard and made me accidentally type: |
#!/bin/dash | |
#A Shell script to fetch bitcoin price and display ! | |
#Author: Rammah Alensari | |
#Dependencies | |
# - jq https://stedolan.github.io/jq/ | |
# - Nerd Font https://www.nerdfonts.com/ (or delete the bitcoin iccon) | |
bitcoin_price=$(curl -s https://api.coindesk.com/v1/bpi/currentprice.json | jq -r '.bpi.USD.rate ' | awk -F '.' '{print $1}') | |
echo " ${bitcoin_price}" | cat |
! | |
! Title: Custom News Outlet Blocklist | |
! Description: Blocks major world-famous news outlets | |
! | |
||10nbc.com^ | |
||10news.com^ | |
||11alive.com^ | |
||12news.com^ | |
||13abc.com^ | |
||13wmaz.com^ |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs
auto read_file(std::string_view path) -> std::string { | |
constexpr auto read_size = std::size_t{4096}; | |
auto stream = std::ifstream{path.data()}; | |
stream.exceptions(std::ios_base::badbit); | |
auto out = std::string{}; | |
auto buf = std::string(read_size, '\0'); | |
while (stream.read(& buf[0], read_size)) { | |
out.append(buf, 0, stream.gcount()); | |
} |
Adapted as text from French Guy Cooking’s Beef Rendang video.
6-8 servings
import com.android.apksig.ApkSigner | |
import com.android.apksig.apk.ApkUtils | |
import com.android.apksig.internal.apk.v1.V1SchemeVerifier | |
import com.android.apksig.util.DataSource | |
import com.android.apksig.util.DataSources | |
def f = new RandomAccessFile(args[0], "r") | |
def apk = DataSources.asDataSource(f, 0, f.length()) | |
def zipSections = ApkUtils.findZipSections(apk) | |
def cdRecords = V1SchemeVerifier.parseZipCentralDirectory(apk, zipSections) |