Skip to content

Instantly share code, notes, and snippets.

@x00real
x00real / dnsmasq OS X.md
Created December 19, 2024 13:55 — forked from ogrrd/dnsmasq OS X.md
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

apiVersion: pilot.kyber.network/v1alpha1
kind: PrivateIngress
metadata:
name: aggregator
spec:
domains:
- aggregator-api.core-cluster.gke.develop.internal
routes:
- name: ''
match:
@x00real
x00real / remove_release.py
Created October 8, 2021 04:05
Quick remove github release
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
import os
import sys
import json
def err(msg, **kwargs):
print(msg, file=sys.stderr, **kwargs)
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import platform
import random
import re
import string
import sys
@x00real
x00real / GPG.md
Created April 15, 2021 17:51
How to trust a imported GPG key
$ gpg --edit-key <uid>
gpg> trust

Please decide how far you trust this user to correctly verify other 
users' keys (by looking at passports, checking fingerprints from 
different sources, etc.)
@x00real
x00real / gate_keeper.sh
Last active April 1, 2021 03:29
Gate Keeper
#!/bin/bash
RED='\033[0;31m'
GRN='\033[0;32m'
BLU='\033[0;34m'
NC='\033[0m'
PS3='Please enter your choice: '
options=("Disable Your GateKeeper" "Enable Your GateKeeper" "Allow Single App To ByPass The GateKeeper" "Quit")
select opt in "${options[@]}"
@x00real
x00real / vault-enc.sh
Last active March 4, 2021 07:37
Encrypt ansible variables
#!/bin/bash
set -e
VAULT=".vault"
trap "rm -f $VAULT" EXIT
#================
if ! command -v "ansible-vault" $> /dev/null; then
echo "Not found command 'ansible-vault'."
exit 1
@x00real
x00real / rules.v4
Created February 17, 2021 08:16
Iptables handle request into docker port
#/etc/iptables/rules.v4
# apply rules => iptables-restore < /etc/iptables/rules.v4
*filter
:INPUT ACCEPT [0:0]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [0:0]
:FILTERS - [0:0]
:DOCKER-USER - [0:0]
@x00real
x00real / Makefile
Created February 4, 2021 07:07
How to export .env file in Makefile
### `.env`
### TEST=ABC
###
test:
$(eval include .env)
$(eval export $(grep -v '^#' .env | xargs -0))
printenv TEST