Skip to content

Instantly share code, notes, and snippets.

View AlphaHydrae's full-sized avatar
💻
Programming

Simon Oulevay AlphaHydrae

💻
Programming
View GitHub Profile
@AlphaHydrae
AlphaHydrae / gist:c1f6b8127cd1e2adacc87fb3f7d028a1
Created June 26, 2021 17:24
EncFS integration test error on Apple M1
$> OPENSSL_ROOT_DIR=/opt/homebrew/Cellar/openssl@1.1/1.1.1k ./build.sh
cmake version 3.20.5
CMake suite maintained and supported by Kitware (kitware.com/cmake).
CMake Deprecation Warning at CMakeLists.txt:4 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
@AlphaHydrae
AlphaHydrae / log.txt
Last active August 31, 2019 12:55
CryFS Rsync Log
$> cryfs --version
CryFS Version 0.10.2
$> system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 10.14.6 (18G95)
Kernel Version: Darwin 18.7.0
@AlphaHydrae
AlphaHydrae / e2e.test.js
Last active January 22, 2019 00:40
One Chat Room End-to-end Test
const webdriver = require('selenium-webdriver');
const { By } = require('selenium-webdriver');
const { port } = require('../config');
const baseUrl = `http://localhost:${port}`;
// Change browser at runtime with:
//
// BROWSER=firefox npm test
const browser = process.env.BROWSER || 'chrome';
@AlphaHydrae
AlphaHydrae / api.test.js
Created January 21, 2019 22:10
One Chat Room API Test
const { expect } = require('chai');
const supertest = require('supertest');
const { port } = require('../config');
const baseUrl = `http://localhost:${port}`;
describe('One Chat Room API', function() {
it('should create a message', async function() {
const req = {
@AlphaHydrae
AlphaHydrae / print-env-var.sh
Last active December 13, 2018 16:38
Print environment variable
#!/bin/bash
name=$1
if test -z "$name"; then
>&2 echo "The first argument must be the name of an environment variable to print"
exit 1
fi
value=${!name}
test -n "$value" && echo "The value of \$$name is $value" || echo "\$$name is not set"
const fs = require('fs');
const originalWords = [ 'Strawberry', 'Apple', 'Orange', 'Banana' ];
writeWords('words.txt', originalWords, function(err) {
if (err) {
console.warn('Error: ' + err.message);
return;
}
@AlphaHydrae
AlphaHydrae / trap.sh
Last active April 6, 2022 02:53
Trap all Unix signals
#!/bin/sh
taunt() {
signal="$1"
echo "Nice try, I am ignoring your SIG$signal signal"
}
for signal in $(kill -l); do
# Ignore SIGCHLD indicating that a child process has terminated.
if [ "$signal" = "CHLD" ]; then
@AlphaHydrae
AlphaHydrae / over-the-rainbow.txt
Created September 27, 2018 15:06
Over the Rainbow Lyrics
Somewhere over the rainbow
Way up high
And the dreams that you dream of
Once in a lullaby
Somewhere over the rainbow
Bluebirds fly
And the dreams that you dream of
Dreams really do come true
@AlphaHydrae
AlphaHydrae / hello-world.txt
Last active September 26, 2018 13:55
Hello World
Hello World