Skip to content

Instantly share code, notes, and snippets.

View stephancasas's full-sized avatar

Stephan Casas stephancasas

View GitHub Profile
@zhuowei
zhuowei / reachable_services.txt
Created February 21, 2023 06:26
Reachable Mach services from the app sandbox on iOS 16.1
PurpleSystemAppPort
PurpleSystemEventPort
UIASTNotificationCenter
com.apple.ABDatabaseDoctor
com.apple.AppSSO.service-xpc
com.apple.AuthenticationServicesCore.AuthenticationServicesAgent
com.apple.CARenderServer
com.apple.ClipServices.clipserviced
com.apple.CoreAuthentication.daemon
com.apple.DeviceAccess.xpc
@plembo
plembo / upnper4dont.md
Last active February 4, 2024 07:09
UPnP with EdgeRouter: Don't do it! Ubiquiti. ER-4.

Want to configure UPnP on EdgeRouter-4?

Don't do it!

Introduction

As a former sysadmin that once helped ride herd over around 1,000 servers, of which around 10% were Internet-facing, I've never been a fan of autoconfiguation when it comes to punching holes through the firewall. I've seen the tripwire logs, and it's sobering.

The Problem

So enabling UPnP on my EdgeRouter-4 wasn't something I had on the roadmap, but when I ran into difficulty getting DLNA to work on the default VLAN, I thought it was worth looking into (never mind that, as I later learned, having UPnP turned on wasn't going make a bit of difference on my local network: another reason that mastering theory should always come before practice).

@pjobson
pjobson / apple_install_dates.md
Last active February 6, 2024 05:20
OSX Install Dates

Various Versions of macOS/OSX will fail on install for various reasons. You can fix them by disconnecting from your wifi or network or resetting your NVRAM. Booting from your USB stick, opening terminal and doing: date ########## where the # nubers are below. Format is: MMDDhhmmYY

10.16 - 0.5 Leopard   - date 0101010121 <- Currently not needed
10.15 - Catalina      - date 0101010120 <- Currently not needed
10.14 - Mojave        - date 0101010119 <- Currently not needed
10.13 - High Sierra   - date 0101010118

10.12 - Sierra - date 0101010117

@jaimeiniesta
jaimeiniesta / settings.jsonc
Created May 12, 2020 10:36 — forked from thbar/settings.jsonc
Current minimalistic VSCode setup (à la atom/textmate)
// My settings for VS Code - inspired by https://gist.github.com/thbar/cfeb158fb6fc52a0fed1df3c84048ffc
{
"window.zoomLevel": 2,
"editor.formatOnSave": true,
"editor.defaultFormatter": "JakeBecker.elixir-ls",
"terminal.integrated.shell.osx": "/bin/bash",
// path at top of editor is very noisy
"breadcrumbs.enabled": false,
@unnamedd
unnamedd / MacEditorTextView.swift
Last active April 16, 2024 10:18
[SwiftUI] MacEditorTextView - A simple and small NSTextView wrapped by SwiftUI.
/**
* MacEditorTextView
* Copyright (c) Thiago Holanda 2020-2021
* https://twitter.com/tholanda
*
* MIT license
*/
import Combine
import SwiftUI
@kainjow
kainjow / libproc_example.swift
Created November 24, 2018 20:09
Swift example of C libproc API
import Darwin
// Call proc_listallpids once with nil/0 args to get the current number of pids
let initialNumPids = proc_listallpids(nil, 0)
// Allocate a buffer of these number of pids.
// Make sure to deallocate it as this class does not manage memory for us.
let buffer = UnsafeMutablePointer<pid_t>.allocate(capacity: Int(initialNumPids))
defer {
buffer.deallocate()
@fnky
fnky / ANSI.md
Last active May 3, 2024 17:31
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@PLG
PLG / Keylogger-main.m
Last active February 8, 2022 20:56
Skrew Everything Keylogger using HID in Objective-C
//
// main.m
// UniversalStatusBarClient
//
#import <Cocoa/Cocoa.h>
#import <IOKit/hid/IOHIDLib.h>
NSArray* keyMap[256];
void fill_keyMap(NSArray * __strong map[]);
@JBlond
JBlond / bash-colors.md
Last active May 3, 2024 11:50 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@uchcode
uchcode / SoundcloudStatusBar.js
Created December 31, 2016 16:57
JXA (JavaScript for Automation) StatuBar applet example.
ObjC.import('Cocoa')
ObjC.import('WebKit')
App = Application.currentApplication()
App.includeStandardAdditions = true
MyAction = SimpleSubclass('Action', {
quit(sender) {
App.quit()
},