Skip to content

Instantly share code, notes, and snippets.

@Jolly-Pirate
Jolly-Pirate / restore_last_git_modified_time.sh
Created June 1, 2021 21:27 — forked from HackingGate/restore_last_git_modified_time.sh
Retrieve and set the last modification date of all files in a git repository. Solution for https://stackoverflow.com/a/55609950/4063462
#!/bin/sh -e
OS=${OS:-`uname`}
if [ "$OS" = 'Darwin' ]; then
get_touch_time() {
date -r ${unixtime} +'%Y%m%d%H%M.%S'
}
else
# default Linux
@Jolly-Pirate
Jolly-Pirate / genesis.txt
Created May 21, 2021 19:38 — forked from moh53n/genesis.txt
This code is from "http://dillingers.com/blog/2015/04/18/how-to-make-an-altcoin" with some changes for newer versions of Bitcoin. Use this for mine the genesis block for a new coin.
/**
* This code is from "http://dillingers.com/blog/2015/04/18/how-to-make-an-altcoin" with some changes for newer versions of Bitcoin.
* Use this for mine the genesis block for a new coin.
* Put this before "consensus.hashGenesisBlock = genesis.GetHash();"
*/
/////////GENESIS MINING///////////////
/*
printf("Genesis mining started\n");
genesis.nNonce = 0;
consensus.hashGenesisBlock = uint256S("0x001");
@Jolly-Pirate
Jolly-Pirate / chainparams.cpp
Created May 20, 2021 19:55 — forked from bellflower2015/chainparams.cpp
Calculating Genesis Block
// ... snip ...
#include <arith_uint256.h>
// ... snip ...
class CMainParams : public CChainParams {
public:
CMainParams() {
@Jolly-Pirate
Jolly-Pirate / generate_blocks.sh
Created May 10, 2021 20:02 — forked from System-Glitch/generate_blocks.sh
Tutorial for bitcoin regtest
# Script to generate a new block every minute
# Put this script at the root of your unpacked folder
#!/bin/bash
echo "Generating a block every minute. Press [CTRL+C] to stop.."
address=`./bin/bitcoin-cli getnewaddress`
while :
do
@Jolly-Pirate
Jolly-Pirate / system-beep.js
Created March 13, 2018 02:32 — forked from taterbase/system-beep.js
System Beep in Node.js
function alertTerminal(){
console.log("\007");
}
@Jolly-Pirate
Jolly-Pirate / nginx.conf
Created October 31, 2017 02:01 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@Jolly-Pirate
Jolly-Pirate / ChaCha+Camellia.md
Created October 30, 2017 06:48 — forked from h-yamamo/ChaCha+Camellia.md
Support ChaCha20-Poly1305 and Camellia-GCM for debian and ubuntu openssl package

Support ChaCha20-Poly1305 and Camellia-GCM for debian and ubuntu openssl package

In order to easily build, I made sets of patches that resolved conflicts (chacha20-poly1305, camellia-gcm, equal-preference-group).

How to build

Ubuntu 16.04 LTS (xenial)

@Jolly-Pirate
Jolly-Pirate / create-iso.sh
Last active March 1, 2017 02:42 — forked from julianxhokaxhiu/create-iso.sh
Bash script to create a Bootable ISO from macOS Sierra Install Image from Mac App Store
#!/bin/bash
#
# Credits to fuckbecauseican5 from https://www.reddit.com/r/hackintosh/comments/4s561a/macos_sierra_16a238m_install_success_and_guide/
# Adapted to work with the official image available into Mac App Store
#
# Modified to use a sparse image
hdiutil attach /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o /tmp/Sierra.sparseimage -size 7316m -type SPARSE -layout SPUD -fs HFS+J
hdiutil attach /tmp/Sierra.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build