Skip to content

Instantly share code, notes, and snippets.

View julian-weinert's full-sized avatar

Julian F. Weinert julian-weinert

  • Berlin, Germany
View GitHub Profile
@paultheman
paultheman / mac_keyremapping.md
Last active March 10, 2025 02:20
Guide on how to remap Keyboard keys on macOS

Guide on how to remap Keyboard keys on macOS

Update 17.10.2024: macOS 15 no longer requires root privileges for hidutil, you need to add hidutil and Terminal to 'Input Monitoring' in Settings/Privacy & Security tab.

Update 13.04.2024: On macOS 14.2 hidutil requires root privileges.

If you have a mac with an INT (ISO) keyboard you might want to change the ± key to ~. During my research I found that the information on this topic is not at all centralized. I prefer this option because it does not involve installing new software.

With macOS 10.12 Sierra Apple introduced hidutil as a tool to remap keyboard keys. See TN2450.

@bchanudet
bchanudet / readme.md
Last active December 31, 2023 13:47
Framebuffer on ST7735s (1.44inch LCD HAT)

Enable modules in Kernel

In raspi-config

Enable SPI under "Interfacing options"

Add modules

$ sudo nano /etc/modules
@koenbok
koenbok / WKWebInspector.m
Created March 13, 2015 10:50
WKWebInspector.m
// https://github.com/WebKit/webkit/blob/master/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h
@interface WKWebView (WKPrivate)
@property (nonatomic, setter=_setAllowsRemoteInspection:) BOOL _allowsRemoteInspection;
@property (copy, setter=_setCustomUserAgent:) NSString *_customUserAgent;
@end
@interface WKPreferences (WKPrivate)
@property (nonatomic, setter=_setCompositingBordersVisible:) BOOL _compositingBordersVisible;
@property (nonatomic, setter=_setCompositingRepaintCountersVisible:) BOOL _compositingRepaintCountersVisible;
@property (nonatomic, setter=_setTiledScrollingIndicatorVisible:) BOOL _tiledScrollingIndicatorVisible;
@frdmn
frdmn / osx-10-10-virtualbox.md
Last active February 22, 2022 08:39
Install OS X 10.10 Yosemite in VirtualBox
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {
UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
// maybe show an action sheet with more options
[self.tableView setEditing:NO];
}];
moreAction.backgroundColor = [UIColor lightGrayColor];
UITableViewRowAction *blurAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Blur" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
[self.tableView setEditing:NO];
}];
@levymetal
levymetal / direct_parent.php
Last active November 27, 2023 04:17
Custom Wordpress function which uses a nav walker to display a list of child pages from a common parent, which can be called from either the parent page (displays children) or any of the child pages (displays siblings). Detailed instructions available on my blog post here: http://christianvarga.com/how-to-get-submenu-items-from-a-wordpress-menu-…
<?php
wp_nav_menu( array(
'menu' => 'Menu Name',
'sub_menu' => true,
'direct_parent' => true
) );
@prehensile
prehensile / prehensile.networkwatcher.plist
Created November 14, 2010 04:41
A launchd daemon to execute a Python script when network configuration changes.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>prehensile.networkwatcher</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python</string>