Skip to content

Instantly share code, notes, and snippets.

View bilalbayasut's full-sized avatar
🍏
___

Bilal Bayasut bilalbayasut

🍏
___
  • Indonesia
View GitHub Profile
@dragonfire1119
dragonfire1119 / adguard-home-docker-compose.yml
Last active June 22, 2024 21:11
adguard-home-docker-compose.yml
version: '3' # Specify the Docker Compose version
services:
adguardhome: # Define the service named 'adguardhome'
image: adguard/adguardhome # Use the 'adguard/adguardhome' Docker image
container_name: adguardhome # Set the container name to 'adguardhome'
restart: unless-stopped # Restart the container automatically unless stopped manually
ports: # Map container ports to host ports
# Expose port 53 on TCP and UDP for DNS queries
- "53:53/tcp"
@Omerr
Omerr / git lol.md
Last active March 11, 2024 06:09
git lol - an alias to Git that shows the commit graph in a pretty format

log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit

To configure as an alias git lol:

git config --global alias.lol "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)&lt;%an&gt;%Creset' --abbrev-commit"

@brav0charlie
brav0charlie / AdGuardHome-DNSOnly-docker-compose.yml
Last active March 9, 2024 13:52
AdGuard Home (No DHCP) in Docker using Docker-Compose
# NOTE: While AdGuard Home may be configured as a DHCP server, this is out
# out of scope for this docker-compose.yml file. Configuring the DHCP
# server requires using 'network_mode: host'.
#
# If you want to use the DHCP server feature, delete the 'network:'
# section (lines 20 & 21), as well as the entire 'ports:' section
# (lines 30 - 47). Then, just below the 'restart:' section (line 19)
# insert a line that reads 'network_mode: host'. The container will
# still reserve all the ports listed below, as well as 67 and 68 for
# DHCP, but there's no need to map them in the docker-compose.yml file
@jjsquady
jjsquady / Traccar_Docker_Install.md
Last active July 25, 2024 13:50
Traccar Docker + PostgreSQL

Install Traccar with Docker + PostgreSQL

Create a new folder traccar on your preference.

Create a file named docker-compose.yml into this traccar folder and put the content bellow:

version: '3.9'

services:
@kytulendu
kytulendu / install-opencl-amd.sh
Last active May 30, 2024 16:27
A shell script to install AMDGPU-PRO OpenCL driver.
#!/bin/bash
# This script will install AMDGPU-PRO OpenCL and Vulkan support.
#
# For Ubuntu and it's flavor, just install the package using this command
# in extracted driver directory instread.
#
# ./amdgpu-pro-install --opencl=legacy,pal --headless --no-dkms
#
# For Arch Linux or Manjaro, use the opencl-amd or rocm-opencl-runtime on AUR instread.
@hermanbanken
hermanbanken / Dockerfile
Last active July 5, 2024 06:54
Compiling NGINX module as dynamic module for use in docker
FROM nginx:alpine AS builder
# nginx:alpine contains NGINX_VERSION environment variable, like so:
# ENV NGINX_VERSION 1.15.0
# Our NCHAN version
ENV NCHAN_VERSION 1.1.15
# Download sources
RUN wget "http://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz" -O nginx.tar.gz && \
@brikis98
brikis98 / main.tf
Last active March 14, 2023 23:43
A hacky way to create a dynamic list of maps in Terraform
# The goal: create a list of maps of subnet mappings so we don't have to statically hard-code them in aws_lb
# https://www.terraform.io/docs/providers/aws/r/lb.html#subnet_mapping
locals {
# These represent dynamic data we fetch from somewhere, such as subnet IDs and EIPs from a VPC module
subnet_ids = ["subnet-1", "subnet-2", "subnet-3"]
eips = ["eip-1", "eip-2", "eip-3"]
}
# Here's the hack! The null_resource has a map called triggers that we can set to arbitrary values.
# We can also use count to create a list of null_resources. By accessing the triggers map inside of
@wronk
wronk / python_environment_setup.md
Last active July 5, 2024 15:08
Setting up your python development environment (with pyenv, virtualenv, and virtualenvwrapper)

Overview of Python Virtual Environments

This guide is targetted at intermediate or expert users who want low-level control over their Python environments.

When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. This helps keep each workflow in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. The guide here covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda). See the Using the workflow section to view the end result.


h/t @sharkinsspatial for linking me to the perfect cartoon

version: 2
jobs:
build:
working_directory: /app
docker:
- image: docker:17.05.0-ce-git
auth:
#Put the contents of keyfile.json into an environment variable for the build called GCR_CREDS, which is then passed in.
username: _json_key
password: $GOOGLE_AUTH
@hktonylee
hktonylee / manage.py
Last active December 19, 2018 21:41
Flask + manage.py + gunicorn + auto-reload + Flask-Sockets + anything you can do with gunicorn script
#!./venv/bin/python3
import os
import sys
import subprocess
from flask_migrate import MigrateCommand
from flask_script import Manager, Command, Option
BASE_DIR = os.path.dirname(os.path.abspath(__file__))