Skip to content

Instantly share code, notes, and snippets.

Disable Device Enrollment Notification on Mac.md

Restart the Mac in Recovery Mode by holding Comment-R during restart

Open Terminal in the recovery screen and type

csrutil disable
@CROSP
CROSP / proxy-del.sh
Last active June 15, 2020 18:57
DD-WRT Remove rules for transparent proxifying
#!/bin/sh
PROXIFYING_MACHINE=192.168.0.145
MACHINE_TO_PROXIFY=192.168.0.113
iptables -D PREROUTING -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
iptables -D PREROUTING -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get lan_ipaddr`/`nvram get lan_netmask` -p tcp -m multiport --dports 80,443 -j CONNMARK --save-mark
iptables -D PREROUTING -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get wan_ipaddr` -p tcp -m multiport --dports 80,443 -j MARK --set-mark 3
iptables -D PREROUTING -t mangle -s $MACHINE_TO_PROXIFY ! -d `nvram get wan_ipaddr` -p tcp -m multiport --dports 80,443 -j CONNMARK --save-mark
while ip rule delete from 0/0 to 0/0 table 13 2>/dev/null; do true; done
@akirattii
akirattii / docker-mysql-slow-query-log.md
Last active July 14, 2023 22:12
memo: MySQL docker container settings for slow query log

Check running mysql container:

$ sudo docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
26137efa979f        mysql               "docker-entrypoint..."   8 months ago        Up 10 minutes       0.0.0.0:3306->3306/tcp   container-mysql

Check docker container mysql version:

$ sudo docker exec container-mysql mysqld --version`
mysqld  Ver 5.7.15 for Linux on x86_64 (MySQL Community Server (GPL))
@grakic
grakic / ePorezi-macOS.md
Last active May 5, 2025 14:34
ePorezi na macOS

ePorezi na macOS

Zvanična klijentska aplikacija Poreske uprave se može preuzeti sa njihove stranice.

U pitanju je Java aplikacija koja dolazi sa posebno priređenom distribucijom Oracle Java radnog okruženja. Aplikacija podržava samo Microsoft Windows operativni sistem i sertifikatima u Personals skladištu pristupa kroz Microsoft CryptoAPI koji poziva operacije na pametnoj kartici ili tokenu posredstvom midlvera.

Sertifikaciono telo Pošte korisnicima nudi SafeSign midlver, osim u verziji za Windows i u verziji za GNU/Linux i macOS operativne sisteme. Midlver isporučuje prateću aplikaciju za upravljanje karticom/tokenom i PKCS#11 biblioteku. Programi poput jSignPDF, Adobe Reader ili LibreOffice mogu da učitaju ovu biblioteku i omoguće korisniku elektronsko potpisivanje dokumenata.

Elektronsko potpisivanje se koristi i na portalu ePorezi Poreske uprave, posredstvom pomenute klijentske aplikacije.

@oboshto
oboshto / tabFocus.js
Created May 22, 2017 11:15
detect tab focus
element.addEventListener('keyup', (e) => {
if (e.keyCode === 9) doSmthng();
});

NGROK OPENAG

Installing a ngrok tunnel on your openag_brain will allow you to access it from anywhere in the world.

Follow these steps:

  1. Create an account at ngrok.com (it's free)
  2. Download ngrok onto your Raspberry Pi
    • wget https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-arm.zip
  3. Unzip the ngrok app in your home folder
  • unzip ngrok-stable-linux-arm.zip
@lobster1234
lobster1234 / localstack.md
Last active August 8, 2023 20:06
Working with localstack on command line

Starting localstack

C02STG51GTFM:localstack mpandit$ make infra
. .venv/bin/activate; exec localstack/mock/infra.py
Starting local dev environment. CTRL-C to quit.
Starting local Elasticsearch (port 4571)...
Starting mock ES service (port 4578)...
Starting mock S3 server (port 4572)...
Starting mock SNS server (port 4575)...
@suntong
suntong / Unicode official emojis.md
Last active July 15, 2025 07:00
unicode emoji symbols icons in UTF8 (emoticons, etc)

©️ Copyright Sign

®️ Registered Sign

‼️ Double Exclamation Mark

⁉️ Exclamation Question Mark

™️ Trade Mark Sign

ℹ️ Information Source

↔️ Left Right Arrow

↕️ Up Down Arrow

↖️ North West Arrow

↗️ North East Arrow

@russkociuba
russkociuba / iterm2_script_tabs.scpt
Created November 28, 2016 21:12
Opens a new iTerm2 window with multiple tabs each executing a command set in the script
# The list of commands to run in each tab of the terminal window
set cmdList to {"ssh [email protected]", "ssh [email protected]"}
# You can append to the list just to break up really long lines
# set cmdList to cmdList & {"ssh [email protected]"}
tell application "iTerm2"
# Not sure how to create an "empty" window so for the window we pick the
# first command in the list
@nikolaposa
nikolaposa / BeanstalkdWorker.php
Last active October 17, 2018 08:56
Beanstalkd queue worker
<?php
declare(strict_types=1);
namespace My\Queue;
use Pheanstalk\Pheanstalk;
use Exception;
class BeanstalkdWorker