Skip to content

Instantly share code, notes, and snippets.

View DominikBucher12's full-sized avatar
🚀
#YOLO

Dominik Bucher DominikBucher12

🚀
#YOLO
View GitHub Profile
@ericdke
ericdke / emojiImage.swift
Created June 17, 2017 08:56
Swift 4 String extension for converting an emoji to an NSImage. Idea and original code by Daniel Jalkut http://indiestack.com/2017/06/evergreen-images/.
import Cocoa
extension String {
// https://stackoverflow.com/a/36258684/2227743
var containsEmoji: Bool {
for scalar in self.unicodeScalars {
switch scalar.value {
case 0x1F600...0x1F64F, // Emoticons
0x1F300...0x1F5FF, // Misc Symbols and Pictographs
@sbaildon
sbaildon / README.md
Last active January 10, 2024 22:27
Yakuza 0 Legend Dragon of Dojima/Mad Dog of Shimano styles AutoHotKey Script

Preface

I wrote this script when Yakuza 0 was a PS4 exclusive, but I've heard whispers that it works just fine for the PC version. No need for PS4 Remote Play

Info

Using the PS4 Remote Play and AutoHotKey for Windows you can automate leveling up the Legend styles for Kiryu (Dragon of Dojima), and Majima (Mad Dog of Shimano).

The PS4 Remote Play app allows keyboard emulation for the Dpad, and "x" button

@0xjac
0xjac / private_fork.md
Last active May 22, 2024 03:41
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare git@github.com:usi-systems/easytrace.git

@swillits
swillits / Keycodes.swift
Last active May 21, 2024 10:09
Swift Keyboard Keycodes
struct Keycode {
// Layout-independent Keys
// eg.These key codes are always the same key on all layouts.
static let returnKey : UInt16 = 0x24
static let enter : UInt16 = 0x4C
static let tab : UInt16 = 0x30
static let space : UInt16 = 0x31
static let delete : UInt16 = 0x33
static let escape : UInt16 = 0x35
T@"<NSTouchBarCustomizationCursorManagerDelegate>",W,V_delegate
T@"<NSTouchBarPressAndHoldTransposerDelegate>",W,V_delegate
T@"NSTouchBarItem",&,V_touchBarItem
NSTouchBarLogOnTouches
NSTouchBarViewObservationContext
T@"NSTouchBarViewController",R,V_applicationTouchBarViewController
T@"NSTouchBarCustomizationController",R
T@"NSTouchBarCustomizationPreviewItemContainerView",R
/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.60/TouchBar.subproj/NSTouchBarCustomizationPreviewCollectionViewItem.m
T@"NSTouchBar",&
@xzzz9097
xzzz9097 / classdump.m
Created December 3, 2016 21:03
DFRFoundation.framework dumps
//
// File: /System/Library/PrivateFrameworks/DFRFoundation.framework/Versions/A/DFRFoundation
// UUID: C3548955-29E4-3B77-BB2D-687FDA287B87
//
// Arch: x86_64
// Current version: 104.2.0
// Compatibility version: 1.0.0
// Source version: 104.2.0.0.0
// Minimum Mac OS X version: 10.12.0
// SDK version: 10.12.0
@wavezhang
wavezhang / java_download.sh
Last active May 21, 2024 14:36
download java from oracle without login
wget -c --no-cookies --no-check-certificate --header "Cookie: oraclelicense=accept-securebackup-cookie" https://download.oracle.com/otn-pub/java/jdk/12.0.2+10/e482c34c86bd4bf8b56c0b35558996b9/jdk-12.0.2_linux-x64_bin.tar.gz
@insidegui
insidegui / WebCacheCleaner.swift
Created September 14, 2016 23:12
Clear WKWebView's cookies and website data storage, very useful during development.
import Foundation
import WebKit
final class WebCacheCleaner {
class func clean() {
HTTPCookieStorage.shared.removeCookies(since: Date.distantPast)
print("[WebCacheCleaner] All cookies deleted")
WKWebsiteDataStore.default().fetchDataRecords(ofTypes: WKWebsiteDataStore.allWebsiteDataTypes()) { records in
@maciekish
maciekish / resetXcode.sh
Created August 10, 2016 10:13
Reset Xcode. Clean, clear module cache, Derived Data and Xcode Caches. You can thank me later.
#!/bin/bash
killall Xcode
xcrun -k
xcodebuild -alltargets clean
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang/ModuleCache"
rm -rf "$(getconf DARWIN_USER_CACHE_DIR)/org.llvm.clang.$(whoami)/ModuleCache"
rm -rf ~/Library/Developer/Xcode/DerivedData/*
rm -rf ~/Library/Caches/com.apple.dt.Xcode/*
open /Applications/Xcode.app
@chrisjlee
chrisjlee / delete-feature-branches.sh
Last active March 30, 2022 21:51
Delete feature branch with prefix locally then remove all remote feature branches
# Stole from:
# http://stackoverflow.com/questions/32122784/alias-script-to-delete-all-local-and-remote-git-branches-with-a-specific-prefix
git branch -D $(printf "%s\n" $(git branch) | grep 'feature/')
# Or this will work too to remove all remote branches:
# https://coderwall.com/p/eis0ba/remove-a-thousand-stale-remote-branches-on-git
git branch -r | awk -F/ '/\/feature/{print $2}' | xargs -I {} git push origin :{}
# Prune all origin branches
git remote prune origin