-
brew install gnupg, pinentry-mac
(this includes gpg-agent and pinentry) -
Generate a key:
$ gpg --gen-key
-
Take the defaults. Whatevs
-
Tell gpg-agent to use pinentry-mac:
$ vim ~/.gnupg/gpg-agent.conf
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
/* | |
* Copyright 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
/* | |
* Copyright (C) 2014 Chris Banes | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
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
Promise.resolve() | |
.then(() => Promise.resolve(">")) | |
.then(() => Promise.resolve(">>")) | |
.then(() => Promise.resolve(">>>")) | |
.then(() => Promise.resolve(">>>>")) | |
.then(() => Promise.resolve(">>>>>")) | |
.then(() => Promise.resolve(">>>>>>")) | |
.then(() => Promise.resolve(">>>>>>>")) | |
.then(() => Promise.resolve(">>>>>>>")) | |
.then(() => Promise.reject("get me out!")) |
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
function runner(cb) { | |
if (Math.round(Math.random())) { | |
return void cb("error"); | |
} | |
return void cb(); | |
} | |
function callback(err) { | |
if (err) { | |
console.error(err); |
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
#!/bin/bash | |
set -e | |
read -e -p "Enter path to Xcode project: " FILES | |
eval FILES=$FILES | |
find "$FILES" -type f \( -name "*.h" -or -name "*.m" \) | while read -r f; | |
do |
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
''' | |
Chaos Game Sierpinski Triangle | |
Reference: https://www.youtube.com/watch?v=kbKtFN71Lfs | |
''' | |
import random | |
import matplotlib.pyplot as plt | |
from numpy.random import rand | |
def midPoint(p1, p2): | |
return ((p1[0] + p2[0]) / 2.0, (p1[1] + p2[1]) / 2.0) | |
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
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Job | |
import kotlinx.coroutines.delay | |
import kotlinx.coroutines.launch | |
/* | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled |
Few months ago, I've made a similar work but I wanted something a little more easier to manage. Please have a look at here for my previous work.
This time, I'm gonna do pretty much the same thing but using Pi-hole as base then modify it to include unbound
and stubby
.
This way, I can use the power of Pi-hole with some additional security layers:
- Recursive DNS check (
unbound
) - DNS-over-TLS (
stubby
)
OlderNewer