Skip to content

Instantly share code, notes, and snippets.

View nikescar's full-sized avatar
😁
;)

Woojae Park nikescar

😁
;)
View GitHub Profile
@arvati
arvati / alpine.md
Last active August 2, 2024 06:55
Install Alpine Linux on sdcard

Mount Destination partition on sdcard

lsblk -f
sudo fdisk /dev/sda
sudo mkfs -t ext4 /dev/sda1
sudo mount -t auto /dev/sda1 /mnt
cd /mnt
sudo su

mkdir -p ./etc/apk
@NinoFoxx
NinoFoxx / main.go
Created November 11, 2022 03:54
Golang DNS server with multiple A/SRV records
package main
import (
"fmt"
"log"
"github.com/miekg/dns"
)
// adapted from https://gist.github.com/walm/0d67b4fb2d5daf3edd4fad3e13b162cb
@dtony
dtony / Readme.md
Last active August 24, 2024 04:29
Headless jitsi meet on Raspberry pi
@olucasmac
olucasmac / commands.php
Created March 20, 2018 19:57 — forked from ChgoChad/commands.php
Script to run Mautic (https://mautic.org) commands from a URL.
<?php
if (!isset($_GET['ILoveMautic'])) {
echo 'The secret phrase is wrong.';
die;
}
$link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$allowedTasks = array(
'cache:clear',
@mildred
mildred / README.md
Last active September 21, 2024 06:59
Build a fedora kernel rpm using docker and git checkouted sources instead of a src.rpm

Build a fedora kernel rpm

Rationale:

  • I need a custom kernel (because sound won't work with vanilla)
  • I want to use Fedora Atomic Host
  • The only way to override the kernel with Fedora Atomic Host is to install a kernel package using ostree-rpm
  • I have a metered network connection and want to avoid downloading the kernel sources too many times
  • The powerful machine that can build the kernel is nor running Fedora or Red-hat based system with rpmbuild available
@saghul
saghul / stream.js
Last active August 24, 2024 04:29
Streaming a webcam to a Jitsi Meet room
const puppeteer = require('puppeteer');
// Streams the first webcam in the system to the specified Jitsi Meet room. Audio is currently
// not sent, but it can be easily enabled by disabling the corresponding setting in `meetArgs`.
//
// TODO
// - Detect if we are kicked from the room
// - Support authenticated deployments
//
@samuelcolvin
samuelcolvin / dns_server.py
Last active November 4, 2024 02:17
requires python 3.5+ and dnslib, see https://github.com/samuelcolvin/dnserver for full/better implementation
from datetime import datetime
from time import sleep
from dnslib import DNSLabel, QTYPE, RD, RR
from dnslib import A, AAAA, CNAME, MX, NS, SOA, TXT
from dnslib.server import DNSServer
EPOCH = datetime(1970, 1, 1)
SERIAL = int((datetime.utcnow() - EPOCH).total_seconds())
@nrollr
nrollr / nginx.conf
Last active April 19, 2025 18:42
NGINX config for SSL with Let's Encrypt certs
# UPDATED 17 February 2019
# Redirect all HTTP traffic to HTTPS
server {
listen 80;
listen [::]:80;
server_name www.domain.com domain.com;
return 301 https://$host$request_uri;
}
# SSL configuration
@likewhoa
likewhoa / howto
Created September 9, 2016 16:44
code that generates a UEFI capable ISO for Gentoo Linux
$ cat mkefiboot
#!/bin/bash
macbootimg() {
python /usr/lib/python3.3/site-packages/livedvd/mkefiboot -a -l "Gentoo Linux" -i gentoo.icns -p "Gentoo Linux" efi/boot macboot.img
}
efiimg() {
local mountdir
mountdir=$(mktemp -d)
@yvoronoy
yvoronoy / my.cnf
Last active December 22, 2022 17:57
MySQL Magento Config
[mysqld]
## After edit config you have to remove log files and restart mysql server
## because after changing innodb-log-file-size you should recreate ib_logfiles
## Stop MySQL server
## rm /data/dir/ib_logfile*
## Run MySQL server
##Table open cache under MacOS and MySQL 5.6 should be 250.
##Otherwise you will get error MySQL server has gone away
##table-open-cache = 250