Skip to content

Instantly share code, notes, and snippets.

View firoze's full-sized avatar

Firoze Rakib firoze

  • Fieldwire
  • San Francisco
  • X @frzrkb
View GitHub Profile
@Jiab77
Jiab77 / create-DNS-over-TLS-bridge-with-pi-hole-unbound-and-stubby-on-ubuntu-server.md
Last active February 25, 2024 03:55
Create DNS-over-TLS bridge with Pi-hole, unbound and stubby on Ubuntu Server

Create DNS-over-TLS bridge with Pi-hole, unbound and stubby on Ubuntu Server

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)
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
@tikipatel
tikipatel / sierpinski_chaos.py
Created April 29, 2017 02:00
Generate Sierpinski Triangle with random numbers
'''
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)
@bcomnes
bcomnes / git-gpg.md
Last active February 13, 2024 07:33
my version of gpg on the mac
  1. brew install gnupg, pinentry-mac (this includes gpg-agent and pinentry)

  2. Generate a key: $ gpg --gen-key

  3. Take the defaults. Whatevs

  4. Tell gpg-agent to use pinentry-mac:

    $ vim ~/.gnupg/gpg-agent.conf 
    
@thefotes
thefotes / dupeImports.sh
Created June 28, 2015 19:11
Given a path to an Xcode project, loops through all files and checks to see if any files have been imported more than once in the same file.
#!/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
function runner(cb) {
if (Math.round(Math.random())) {
return void cb("error");
}
return void cb();
}
function callback(err) {
if (err) {
console.error(err);
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!"))
/*
* 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
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* 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
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote