Skip to content

Instantly share code, notes, and snippets.

@DGh0st
DGh0st / .tmux.conf
Last active June 29, 2019 08:02
~/.tmux.conf
# enable mouse scrolling
setw -g mouse on
# start with 1 instead of 0
set -g base-index 1
# enable 256 colors
set -g default-terminal screen-256color
# create new bindings
@DGh0st
DGh0st / SBIconController(iOS 12 icon force touch).mm
Last active May 17, 2019 06:13
SBIconController's implementation app icon force touch related methods for iOS 12 (generated using a disassembler)
@implementation SBIconController
-(BOOL)_isAppIconForceTouchControllerPeekingOrShowing {
if (self->_appIconForceTouchController != nil)
return [self->_appIconForceTouchController state] > 0;
return NO;
}
-(void)_dismissAppIconForceTouchControllerIfNecessaryAnimated:(BOOL)arg1 withCompletionHandler:(id)arg2 {
if (self->_appIconForceTouchController != nil)
[self->_appIconForceTouchController dismissAnimated:arg1 withCompletionHandler:arg2];
@DGh0st
DGh0st / SBLockscreenDateViewController(iOS 12).mm
Last active May 3, 2019 04:49
SBLockscreenDateViewController implementation for iOS 12 (generated using a disassembler)
@interface SBLockScreenDateViewController : UIViewController <SBDateTimeOverrideObserver, _UISettingsKeyObserver> {
NSNumber* _timerToken;
BOOL _isScreenOn;
BOOL _isVisible;
BOOL _disablesUpdates;
_UILegibilitySettings* _legibilitySettings;
}
@DGh0st
DGh0st / SBLockscreenDateViewController(iOS 10).mm
Last active August 25, 2019 06:40
SBLockscreenDateViewController implementation for iOS 10 (generated using a disassembler)
@interface SBLockScreenDateViewController : UIViewController <SBDateTimeOverrideObserver, _UISettingsKeyObserver> {
NSNumber* _timerToken;
BOOL _disablesUpdates;
_UILegibilitySettings* _legibilitySettings;
}
@property (assign,getter=isSubtitleHidden,nonatomic) BOOL subtitleHidden;
@property (nonatomic,retain) _UILegibilitySettings * legibilitySettings;
@DGh0st
DGh0st / FileLogging.h
Last active September 17, 2023 07:50
Log to a custom file, can be used to get logs from users with a debug build.
#ifndef FILELOGGING
#define FILELOGGING
#ifndef DEBUG
#define FLOG(args...)
#else
#define kLOGFILEPATH @"/path/to/log/file.log"
void _FLog(const char *functionName, int lineNumber, NSString *msgFormat, ...) {
va_list ap;