Skip to content

Instantly share code, notes, and snippets.

View TyrfingMjolnir's full-sized avatar
💭
in my scriptorium whipping up some whoopass

Tyrfing Mjølner TyrfingMjolnir

💭
in my scriptorium whipping up some whoopass
View GitHub Profile
@TyrfingMjolnir
TyrfingMjolnir / NetworkingExample.swift
Last active November 7, 2022 12:17 — forked from vinczebalazs/NetworkingExample.swift
Protocol and generic based networking example.
import Foundation
// Model.
struct Employee: Codable {
let id: Int
let name: String
}

OSI model

# Name Typical
7 Application HTTP( APIs etc, ) FTP, SMTP
6 Presentation Encryption
5 Session Controls termination
4 Transport TCP / UDP / ICMP / etc
3 Network IPv4 + IPv6
2 Data link Ethernet MAC( Media Access Control ) Address
@TyrfingMjolnir
TyrfingMjolnir / exa-T.txt
Created April 7, 2022 20:24
Here is a tree listing of the XCode template files.
$ exa -T $(pwd)
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/Xcode/Templates
├── File Templates
│ ├── iOS
│ │ ├── Apple Watch
│ │ │ └── WatchKit Settings Bundle.xctemplate
│ │ │ ├── ___FILEBASENAME___.bundle
│ │ │ │ ├── en.lproj
│ │ │ │ │ └── Root.strings
│ │ │ │ └── Root.plist
@TyrfingMjolnir
TyrfingMjolnir / smart-pub.md
Created January 6, 2022 01:56 — forked from onnet/smart-pub.md
SmartOS zone manipulation. Snapshot, image, rollback, and migrate.

SmartOS Zone Manipulation

Notes on snapshots, images, and migrations

Create Zone/KVM

# Create zone
vmadm create <<EOL
{
 "brand": "joyent",
 .
@TyrfingMjolnir
TyrfingMjolnir / MacOSX-smartos-xhyve.md
Last active January 6, 2022 01:59 — forked from skirmess/windows-10-pro-smartos-bhyve.md
WIP Work in Progress, not yet PoC MacOS X template for SmartOS Bhyve and MacOS X xHyve
@TyrfingMjolnir
TyrfingMjolnir / StringExtension+xmlEncode+xmlDecode.swift
Last active March 28, 2021 08:58
FMPXMLRESULT as SOAP payload
import Foundation
extension String {
var xmlEncode: String {
return self
.replacingOccurrences( of: "&", with: "&amp;" )
.replacingOccurrences( of: "\"", with: "&quote;" )
.replacingOccurrences( of: "<", with: "&lt;" )
.replacingOccurrences( of: ">", with: "&gt;" )
.replacingOccurrences( of: "'", with: "&apos;" )
@TyrfingMjolnir
TyrfingMjolnir / Megadeth_peace_sells.txt
Last active February 6, 2021 05:43
It's we the people, right?
What do you mean, "I don't believe in God"?
I talk to him everyday
What do you mean, "I don't support your system"?
I go to court when I have to
What do you mean, "I can't get to work on time"?
Got nothing better to do
And, what do you mean, "I don't pay my bills"?
Why do you think I'm broke? Huh?
If there's a new way
@TyrfingMjolnir
TyrfingMjolnir / osxSetup.command
Created February 5, 2021 11:04 — forked from rettuce/osxSetup.command
osx setup command. use com.apple.dock.plist
#!/bin/sh
### Desktop & Screen Saver
# Desktopを黒に
echo "Change Desctop Pictures"
osascript -e 'tell application "Finder" to set desktop picture to POSIX file "/Library/Desktop Pictures/Solid Colors/Solid Gray Pro Ultra Dark.png"'
# ScreenSaver Kill
echo "Disable screensaver"
@TyrfingMjolnir
TyrfingMjolnir / Readme.md
Last active February 5, 2021 11:08 — forked from OlliV/disable_OS_X_NotificationCenter.txt
Disable that annoying NotificationCenter on OS X Mountain Lion

In Catalina boot into a different volume to have catalina system volume r/w

@TyrfingMjolnir
TyrfingMjolnir / Disable.sh
Created January 12, 2021 09:07
Permanently disable notification center MacOS X
launchctl unload -w /System/Library/LaunchAgents/com.apple.notificationcenterui.plist