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
Convenient DeDRM Scripts | |
------------------------- | |
**NOTE**: read https://blog.quaintous.com/2021/02/16/remove-drm-from-ebooks/ to find out what this gist is good for. | |
* ./init.sh: extracts Adobe Digital Editions private key and required files to DeDRM. | |
* ./dedrm: removes DRM from given ebook (pdf/epub) | |
If you are using this for the first time, make sure that you have authenticated your Adobe Digital Editions (ADE) and run './init.sh'. Import any DRM-protected file into ADE and run 'dedrm.sh': |
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
#include "ConfigFormat.h" | |
#include <string.h> | |
const struct ConfigFormatField *ConfigFormatGetFieldByName(const struct ConfigFormat *Format, const char *Name, void *Structure) | |
{ | |
static struct ConfigFormatField Field; | |
for (size_t n = 0; n < Format->num_members; n++) { | |
if (strcmp(Name, Format->names[n]) != 0) { | |
continue; |
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
project(stlink C) | |
cmake_minimum_required(VERSION 3.1) | |
set (CMAKE_C_STANDARD 99) | |
include(CheckCCompilerFlag) | |
find_package(PkgConfig) | |
set(CMAKE_MODULE_PATH "${CMAKE_MODULE_PATH};${CMAKE_SOURCE_DIR}/cmake/modules") | |
file(DOWNLOAD |
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
#include <WiFi.h> | |
#include <SPIFFS.h> | |
#include <ESPAsyncWebServer.h> | |
#include <WebSocketsServer.h> | |
// Constants | |
const char *ssid = "ESP32-AP"; | |
const char *password = "LetMeInPlz"; | |
const char *msg_toggle_led = "toggleLED"; | |
const char *msg_get_led = "getLEDState"; |
I recently set up a host running Ubuntu 14.04 LTS, ubuntu-zfs, and PostgreSQL 9.3. Using the ZFS snapshot feature I was able to make a snapshot of the file system holding the PostgreSQL database, write the snapshot to a compressed file, transfer it to another Ubuntu 14.04 LTS host running ubuntu-zfs, restore it, and launch PostgreSQL using that data directory with all the data (seemingly) intact.
The database is very low-traffic, so I do not know how effective this strategy would be for a busier database.
I take no responsibility if you attempt this setup and it causes data loss or other issues. Use it at your own risk; this document is meant to explain a potential setup and open discussion about limitations and potential improvements.
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
Download ejs.min.js from https://cdn.jsdelivr.net/npm/ejs@3.1.6/ejs.min.js | |
See also https://cpp.hotexamples.com/examples/-/QJSEngine/toScriptValue/cpp-qjsengine-toscriptvalue-method-examples.html |
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
/* | |
* robot.js | |
* | |
* You'll need three keys in order to unlock the | |
* Algorithm: the red key, the green key, and the | |
* blue key. Unfortunately, all three of them are | |
* behind human-proof barriers. | |
* | |
* The plan is simple: reprogram the maintenance | |
* robots to grab the key and bring it through |
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
/************* | |
* ambush.js * | |
************* | |
* | |
* Oh. Oh, I see. This wasn't quite part of the plan. | |
* | |
* Looks like they won't let you take the Algorithm | |
* without a fight. You'll need to carefully weave your | |
* way through the guard drones. | |
* |
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
/********************** | |
* fordingTheRiver.js * | |
********************** | |
* | |
* And there's the river. Fortunately, I was prepared for this. | |
* See the raft on the other side? | |
* | |
* Everything is going according to plan. | |
*/ |
NewerOlder