Skip to content

Instantly share code, notes, and snippets.

View ruyrybeyro's full-sized avatar

Rui Ribeiro ruyrybeyro

View GitHub Profile
@kconner
kconner / macOS Internals.md
Last active November 13, 2024 07:51
macOS Internals

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

@kaigouthro
kaigouthro / Pine_Script_5_Mini_Reference.md
Last active November 10, 2024 05:14
A minimal reference to pine script v5

Pine Script Mini-Reference

This document provides a concise reference for Pine Script, a programming language specifically designed for trading strategies and indicators within TradingView.

Operators

Arithmetic Operators

Operator Description
@mardahl
mardahl / updateSfBGAL.ps1
Last active January 2, 2023 17:03
Script to force update Skype for Business Clients Global Address List
<#
.SYNOPSIS
Script to force update Skype for Business Clients Global Address List Written by Michael Mardahl (iphase.dk)
(Provided AS-IS! I will not be held liable for any negative consequences)
.DESCRIPTION
This script will shutdown the SfB client, update the registry and delete the GAL DB, then start the client again. It should be run in the users context as it does user specific things.
.EXAMPLE
Just run the script without parameters
@jblang
jblang / disz80.asm
Created May 14, 2018 01:04
John Kerr's DIS-Z80 with Comments
SECTION code_clib
PUBLIC disz80
PUBLIC _disz80
EXTERN fputc_cons
; This code is been found in a ZX Spectrum tool called UTILITY3 v1.3
@BalorPrice
BalorPrice / simple_scroll.asm
Last active March 13, 2023 22:55
Simple ZX Spectrum scroller - amended from John Metcalf's 69-byte scroller
org 32768
init_scroll:
ld hl,message-1 ; set to refresh char on first call
ld (scroll_pos),hl
ld hl,pix_count ; variable to check if new character needed
ld (hl),1
ret
update_scroll:
@mpeven
mpeven / captive_portal.sh
Last active January 10, 2023 00:47
iOS captive portal
# Captive portal setup
########################################################
sudo apt-get update -qq
sudo apt-get install -qq dnsmasq vim hostapd ufw dnsutils netstat-nat conntrack nginx php5 php5-common php5-fpm
sudo mkdir /usr/share/nginx/html/portal
sudo useradd nginx
sudo chown nginx:www-data /usr/share/nginx/html/portal
sudo chmod 755 /usr/share/nginx/html/portal
########################################################
@thisismitch
thisismitch / haproxy.cfg
Last active October 18, 2024 15:19
Let's Encrypt Auto-Renewal script for HAProxy
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
maxconn 2048
@mfriedenhagen
mfriedenhagen / password_from_keyring.py
Last active January 3, 2018 05:14
A simple keyring based password provisioner for ansible
"""
Store this file as `vars_plugins/password_from_keyring.py` and specify the
following in `ansible.cfg`:
```
[defaults]
vars_plugins=./vars_plugins
```
In your inventory specify:
@mcnewton
mcnewton / freeradiuscheck.sh
Last active April 27, 2020 14:50
Check that FreeRADIUS stack is running
#! /bin/bash
CONFIG_DISK_THRESHOLD=95
FR_PIDFILE=/var/run/freeradius/freeradius.pid
FR_BINARY=/usr/sbin/freeradius
DATE_MIN=$(date +%_M)
TEST_USER=checkuser
TEST_DOMAIN=my.domain.example
TEST_PASSWORD=password
@ruskotron
ruskotron / key_decode.py
Created January 14, 2015 09:13
Decode MS-MPPE-Send-Key / MS-MPPE-Recv-Key
from hashlib import md5
from binascii import unhexlify, hexlify
seq_xor = lambda c, b: ''.join(
chr(x) for x in map(lambda X: ord(X[0]) ^ ord(X[1]), zip(c, b))
)
#