Skip to content

Instantly share code, notes, and snippets.

@purefan
purefan / zfs-setup.nix
Created August 7, 2024 23:15
zfs-setup.nix
{
# configuration.nix
systemd.services.zfs-setup = {
description = "ZFS Setup";
after = [ "zfs-import.target" ];
wants = [ "zfs-import.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${pkgs.writeShellScriptBin "zfs-setup" ''
FAIL src/EngineChain/test.spec.js
● Test suite failed to run
Jest encountered an unexpected token
This usually means that you are trying to import a file which Jest cannot parse, e.g. it's not plain JavaScript.
By default, if Jest sees a Babel config, it will use that to transform your files, ignoring "node_modules".
Here's what you can do:
@purefan
purefan / ws-client.cpp
Last active May 10, 2018 11:56
cpp ws client - not working
#include "stdafx.h"
#include <websocketpp/config/asio_no_tls_client.hpp>
#include <websocketpp/client.hpp>
#include <Windows.h>
#include <iostream>
#include <stdio.h>
#include <fstream>
#include <future>
typedef websocketpp::client<websocketpp::config::asio_client> client;
@purefan
purefan / 2017-06-29.json
Last active June 29, 2017 09:56
Stylus styles
This file has been truncated, but you can view the full file.
[
{
"sections": [
{
"code": "/***************************************************************\n Stack Overflow Dark v2.9.47 (2017-05-29)\n https://github.com/StylishThemes/StackOverflow-Dark\n http://userstyles.org/styles/35345\n\n ** Will apply to almost all Stack Exchange Sites **\n Except:\n * Area 51 (area51.stackexchange.com)\n * Gaming (gaming.stackexchange.com)\n\n ** Please open an issue to report sites where the style breaks **\n https://github.com/StylishThemes/StackOverflow-Dark/issues\n\n previous version information contained at the userstyles site\n ****************************************************************/\n\n * {\n border-color: #444 !important;\n text-shadow: none !important;\n box-shadow: none !important;\n }\n\n body {\n background: #191919 !important; \n }\n\n /* custom code font */\n pre.prettyprint {\n font-family: \"Menlo\", Monaco, Consolas, \"Liberation Mono\", Menlo, Courier, monospace !important;\n }\n\n /* === custom color === *
@purefan
purefan / generic-dark-theme.css
Created March 31, 2017 10:27
Generic dark theme for Stylish based on Krebs on security
body,
h1, h2, h3,
div > h2,
.post h2,
p,
ol.commentlist,
ol.commentlist li,
ol.commentlist li.even,
li.comment,
#commentform > p > label > small
@purefan
purefan / keybase.md
Last active February 14, 2017 15:25

Keybase proof

I hereby claim:

  • I am purefan on github.
  • I am purefan (https://keybase.io/purefan) on keybase.
  • I have a public key whose fingerprint is D2CF D858 B1EC C85E C149 B7F6 8E99 4C00 AB86 566A

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am purefan on github.
  • I am purefan (https://keybase.io/purefan) on keybase.
  • I have a public key ASAGHxbvAk3qB4QbuvMRa98GZ1iMh2xdOvmuZnd7vG_54Qo

To claim this, I am signing this object:

@purefan
purefan / mypinger.sh
Created January 26, 2016 09:48
Simple ping wrapper
#!/bin/bash
DOCURL=true;
echo $0
runCurl() {
PING=$(curl --connect-timeout 1 --max-time 1 --head -s ${1});
ISUP=false;
if [[ $PING == *"200 OK"* ]]; then
ISUP=true;
@purefan
purefan / gist:b3e72ed6847edfcf7eaa
Created March 7, 2015 01:17
NullPointer Exception running build-deps.sh
[info] Set current project to tmp-6tdmfihlov (in build file:/tmp/tmp.6tdmfIhloV/)
[info] Packaging /tmp/tmp.6tdmfIhloV/target/scala-2.10/tmp-6tdmfihlov_2.10-0.1-SNAPSHOT-sources.jar ...
[info] Done packaging.
[info] Updating {file:/tmp/tmp.6tdmfIhloV/}tmp-6tdmfihlov...
[info] Resolving org.fusesource.jansi#jansi;1.4 ...
[info] Done updating.
[info] Wrote /tmp/tmp.6tdmfIhloV/target/scala-2.10/tmp-6tdmfihlov_2.10-0.1-SNAPSHOT.pom
[info] :: delivering :: default#tmp-6tdmfihlov_2.10;0.1-SNAPSHOT :: 0.1-SNAPSHOT :: integration :: Sat Mar 07 01:14:23 UTC 2015
[info] delivering ivy file to /tmp/tmp.6tdmfIhloV/target/scala-2.10/ivy-0.1-SNAPSHOT.xml
[info] Packaging /tmp/tmp.6tdmfIhloV/target/scala-2.10/tmp-6tdmfihlov_2.10-0.1-SNAPSHOT-javadoc.jar ...
Verifying that +purefan is my Bitcoin username. You can send me #bitcoin here: https://onename.io/purefan