Skip to content

Instantly share code, notes, and snippets.

View muizidn's full-sized avatar
👨‍🚀
Working between Tiangong and Mir

Former Not Wannabe Lord Paramount of the Wkwkland muizidn

👨‍🚀
Working between Tiangong and Mir
  • Indian Ocean
View GitHub Profile
@muizidn
muizidn / Make_OSX_INSTALLER_WITHOUT_MAC.lnk
Created May 26, 2019 22:41
Nice Tutorial For Your Mac Development
Avoid Hackintosh, but sometimes need it to regain access to my unbootable Mac. Hupfh.
https://www.insanelymac.com/forum/topic/329828-making-a-bootable-high-sierra-usb-installer-entirely-from-scratch-in-windows-or-linux-mint-without-access-to-mac-or-app-store-installerapp/
@mgrebenets
mgrebenets / buck-xcarchivegen.sh
Created April 15, 2019 00:41
Generate Xcode archive from Buck output
#!/usr/bin/env bash
XCARCHIVE=$1
APP_DIR=$2
APP_NAME=$(basename "${APP_DIR}")
OUT_DIR=$(dirname "$PWD")
PBUDDY=/usr/libexec/PlistBuddy
# Copy directories into xcarchive
mkdir -p "${XCARCHIVE}/BCSymbolMaps"
@leptos-null
leptos-null / cycript-mojave.md
Last active April 4, 2023 18:48
Using cycript on macOS Mojave

Cycript on Mojave

Cycript is a tool I find very helpful. It's an effective REPL for Objective-C. When I updated to macOS Mojave, I found that cycript no longer worked because it was linked against an old version of Ruby. After attempting to compile from source, I tried another solution. install_name_tool is an open source tool for modifying the names of linked shared libraries in a Mach-O.

Solution

$ install_name_tool -change /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/libruby.dylib Cycript.lib/cycript-apl
$ install_name_tool -change /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/libruby.2.0.0.dylib /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/lib/libruby.dylib Cycript.lib/libcycript.dylib
@iAmrSalman
iAmrSalman / encodeVideo.swift
Last active June 12, 2023 19:10
[Convert MOV to MP4] function to convert MOV to MP4 video format#swift #avkit #avasset
// Don't forget to import AVKit
func encodeVideo(at videoURL: URL, completionHandler: ((URL?, Error?) -> Void)?) {
let avAsset = AVURLAsset(url: videoURL, options: nil)
let startDate = Date()
//Create Export session
guard let exportSession = AVAssetExportSession(asset: avAsset, presetName: AVAssetExportPresetPassthrough) else {
completionHandler?(nil, nil)
return
// MyURLStreamTask.swift
// Demonstrates using an NSURLSessionStreamTask to implement a bidirectional TCP socket connection
//
// by rhn@nicholson.com 2017-03-07
// distribution: BSD 2-clause
//
import Foundation
class MyURLStreamTask {
@joncardasis
joncardasis / Storing-Images-On-Github.md
Last active February 2, 2024 02:30
Storing Images and Demos in your Repo

Storing Images and Demos in your Repo

In this quick walkthough you'll learn how to create a separate branch in your repo to house your screenshots and demo gifs for use in your master's readme.

How to

1. Clone a fresh copy of your repo

In order to prevent any loss of work it is best to clone the repo in a separate location to complete this task.

2. Create a new branch

Create a new branch in your repo by using git checkout --orphan assets