Skip to content

Instantly share code, notes, and snippets.

View xardit's full-sized avatar
🍀

Ardit xardit

🍀
  • Space
View GitHub Profile
@ZhuYouwei
ZhuYouwei / Export Notes.AppleScript
Last active August 14, 2021 12:50
Export Mac Notes to txt file
property outputPath : (path to desktop as text) & "export"
tell application "Finder"
if not (exists outputPath) then
make new folder at desktop with properties {name:"export"}
end if
end tell
tell application "Notes"
set Nf to text returned of (display dialog "Folder Name" default answer "Notes")
@lbrame
lbrame / podman_arch_rootless.md
Created February 11, 2020 17:47
Running rootless unprivileged Podman containers on Arch Linux

Setting up podman rootless containers on Arch Linux

Podman is a container engine that is similar to and fully compatible with Docker that has the peculiarity of not requiring a daemon to run and to allow for rootless containers, which are often deemed safer than privileged containers running as root. Podman is a drop-in replacement for Docker that even supports the same syntax and it has good support from Red Hat.

However, running podman rootless containers on Arch Linux may not be obvious, so I'm writing the instructions I have used to achieve that here.

Podman works using control groups and users from which said containers need to be launched need to be assigned an appropriate range of subordinate user and group IDs. On Arch Linux, these files are not present and they need to be created.

From a root shell:

@pyrou
pyrou / docker-compose.yml
Last active March 9, 2026 14:16
Use https://traefik.me SSL certificates for local HTTPS without having to touch your /etc/hosts or your certificate CA.
version: '3'
services:
traefik:
restart: unless-stopped
image: traefik:v2.0.2
ports:
- "80:80"
- "443:443"
labels:
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
@yusufsyaifudin
yusufsyaifudin / .gitlab-ci.yml
Last active May 17, 2025 20:39
Docker Compose: Redis, Consul, Mongo, Jaeger with Health check. Sample of gitlab-ci.yml for running Go test (integration test or unit test)
# Inspiration: https://b.agilob.net/test-coverage-in-gitlab-ci-in-a-golang-project
# Navigate to: "Settings" -> "CI/CD" -> "Expand" next to "General pipeline settings"
# 1. Add ^coverage:\s(\d+(?:\.\d+)?%) tas your regex in "Test coverage parsing"
# 2. Go to "Pipeline status" to get the badges code
# This file is a template, and might need editing before it works on your project.
image: golang:1.13.4-alpine
services:
- docker:stable-dind # only docker daemon, so we need to install docker cli and docker compose in separate script
@hazcod
hazcod / wgcf.sh
Created October 16, 2019 06:10
Connect to Cloudflare Warp from macOS.
#!/usr/bin/env bash
set -euo pipefail
shopt -s inherit_errexit 2>/dev/null || true
# this script will connect macOS to Cloudflare Warp using Wireguard
# note: this is *absolutely not* an official client from Cloudflare
# Copyright (C) 2019 Jay Freeman (saurik)
# Zero Clause BSD license {{{

MongoDB Cheat Sheet

Show All Databases

show dbs

Show Current Database

@JerryLokjianming
JerryLokjianming / Crack Sublime Text Windows and Linux.md
Last active March 25, 2026 20:04
Crack Sublime Text 3.2.2 Build 3211 and Sublime Text 4 Alpha 4098 with Hex

How to Crack Sublime Text 3.2.2 Build 3211 with Hex Editor (Windows | Without License) ↓

  1. Download & Install Sublime Text 3.2.2 Build 3211
  2. Visit https://hexed.it/
  3. Open file select sublime_text.exe
  4. Offset 0x8545: Original 84 -> 85
  5. Offset 0x08FF19: Original 75 -> EB
  6. Offset 0x1932C7: Original 75 -> 74 (remove UNREGISTERED in title bar, so no need to use a license)
@bmaupin
bmaupin / free-database-hosting.md
Last active March 24, 2026 11:03
Free database hosting
@chrisswanda
chrisswanda / WireGuard_Setup.txt
Last active March 27, 2026 04:55
Stupid simple setting up WireGuard - Server and multiple peers
Install WireGuard via whatever package manager you use. For me, I use apt.
$ sudo add-apt-repository ppa:wireguard/wireguard
$ sudo apt-get update
$ sudo apt-get install wireguard
MacOS
$ brew install wireguard-tools
Generate key your key pairs. The key pairs are just that, key pairs. They can be
@trey8611
trey8611 / import-optimizations.md
Last active November 29, 2024 11:06
WP All Import - Optimize your import speed.