Skip to content

Instantly share code, notes, and snippets.

@irazasyed
irazasyed / 1-dnsmasq-dnscrypt-proxy-setup.md
Last active June 24, 2025 20:17
How to Setup dnsmasq with dnscrypt-proxy and Cloudflare DNS on macOS

How to Setup dnsmasq with dnscrypt-proxy and Cloudflare DNS on macOS

Using Laravel Valet for localhost development, So it installs dnsmasq with it. dnsmasq runs on port 53, The default DNS port. So we setup dnscrypt-proxy on port 5300 with the default config files in this gist.

dnscrypt-proxy Installation

brew install dnscrypt-proxy
@lpranam
lpranam / squash.md
Last active August 3, 2025 10:49
How to squash commits

What is squashing?

Squashing is a process in which we squeeze multiple commits into one pretending it is only a single commit.

Basically squashing commits means we are rewriting the history of commits to make them look like single commit.

squash-diagram.jpg

Why squashing commits is necessary?

@ndlrx
ndlrx / dnscrypt-proxy.md
Last active November 14, 2025 03:35
Install dnscrypt-proxy on Archlinux or Manjaro

Step 1 - Install and Configure dnscrypt-proxy

sudo su
pacman -S dnscrypt-proxy
cd /etc/dnscrypt-proxy/
@krisleech
krisleech / renew-gpgkey.md
Last active November 26, 2025 08:19
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

Overview - Adding support for a new currency in Coinomi

The Coinomi wallet can support any kind of cryptographic currency because it adopts the model of a thin wallet.

A thin wallet will delegate most of the complexity to a trusted server, while still maintaining control of the private keys by using a deterministic key chain BIP44. It is different than SPV in that it doesn't need to perform any header or transaction merkle root validations (although it is optionally possible).

The advantage of a thin wallet is that it is light weight and can easily work with low-specs devices and consumes small amounts of network bandwidth. Some assets like Peercoin, CounterParty or Mastercoin can only work with this model because as SPV is not enough to validate transactions. The disadvantage is that it needs a trusted service to get the state of the network. A known attack for an SPV wallet is to hide transactions, in a thin wallet it is possible to al

@tterb
tterb / README-badges.md
Last active August 19, 2025 18:32
A collection of README badges

Badges

License

MIT License GPLv3 License AGPL License

Version

Version GitHub Release

@LouisCAD
LouisCAD / MyPreferences.kt
Last active September 14, 2020 17:12
Make Android's SharedPreferences as simple as a field in kotlin.
package com.mypackage.myapp.prefs
import android.content.Context
import com.mypackage.myapp.appCtx
object MyPreferences : Preferences(name = "MyPrefsFileName") {
var userWantsFancyUi by BoolPref(Keys.FANCY_UI, false)
var isFcmTokenSent by BoolPref(Keys.FCM_TOKEN_SENT_TO_SERVER, false)
var eggTapsCount by LongPref(Keys.EGG_TAPS_COUNT, 0L)
@muhammadghazali
muhammadghazali / What is server_names_hash_bucket_size.md
Last active March 11, 2025 03:56
Nginx: What is server_names_hash_bucket_size?

Background

While I'm learning how to use Nginx, I was instructed to update the server_names_hash_bucket_size (/etc/nginx/nginx.conf) value from 32 to 64, but I don't understand why should I increase the value to 64.

References

References that have been read so far:

@tyrcho
tyrcho / README.md
Last active November 27, 2021 05:07
Find and recompress from x265 to x264 with ffmpeg
@longtimeago
longtimeago / squash-commits.md
Last active April 1, 2024 20:44
How to squash commits in a GitHub pull request

How to squash commits in a GitHub pull request

o you've contributed some code to an open source project, say, Rails. And they'd like you to squash all of the commits in your pull request. But you're not a git wizard; how do you make this happen?

Normally, you'd do something like this. I'm assuming upstream is a git remote that is pointing at the official project repository, and that your changes are in your 'omgpull' branch: