Skip to content

Instantly share code, notes, and snippets.

View lukaskollmer's full-sized avatar
👻
procrastinating

Lukas Kollmer lukaskollmer

👻
procrastinating
View GitHub Profile
// fixes the gmail redesign by making the left sidebar smaller
const NEW_WIDTH = '220px'
const fixSidebarWidth = () => {
// this seems to be the sidebar
const elem1 = document.getElementsByClassName('nH oy8Mbf nn aeN')[0]
elem1.style.setProperty('width', NEW_WIDTH)
elem1.style.setProperty('min-width', '0px', 'important')
//
// UIControl+Blocks.swift
// Scripter
//
// Created by Lukas Kollmer on 04.06.17.
// Copyright © 2017 Lukas Kollmer. All rights reserved.
//
import Foundation
import UIKit
/* ubahn */
with ubahn(von, nach, dauer) as (
values
('GFZ', 'Garching', 2),
('Garching', 'GHB', 2),
('GHB', 'Froettmaning', 4),
('Froettmaning', 'Kieferngarten', 2),
('Kieferngarten', 'Freimann', 1)
)
@lukaskollmer
lukaskollmer / test_dlsym_get_symbol_objc_constant.m
Created February 23, 2018 14:35
get NSString* constants at runtime
//
// main.m
// test_dlsym_get_symbol_objc_constant
//
// Created by Lukas Kollmer on 31.01.18.
// Copyright © 2018 Lukas Kollmer. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
Precedence Operator Description Associativity
15 () method invocation LTR
15 [] array subscript LTR
15 . member access/selection LTR
14 ++ unary postfix increment RTL
14 -- unary postfix decrement RTL
13 ++ unary prefix increment RTL
@lukaskollmer
lukaskollmer / fib_template.asm
Last active December 22, 2017 18:31
fibonacci, implemented using c++ templates
main: # @main
push rbp
mov rbp, rsp
mov eax, 13
mov dword ptr [rbp - 4], 0
pop rbp
ret
@lukaskollmer
lukaskollmer / gist:87e41c0621c0eebc6c7ca4ddca8e5225
Created November 25, 2017 17:37 — forked from johanbrook/gist:761909
Convert an ICNS file to PNG with alpha transparency
sips -s format png /Applications/Safari.app/Contents/Resources/compass.icns --out /Users/Johan/Desktop/safari.png
{
"IsLive" : false,
"IsShortcut" : false,
"IsPrivate" : false,
"ThumbnailImageUrl" : "https:\/\/streams.tum.de\/Mediasite\/FileServer\/Presentation\/09c650cc4a194c7291c885f5823d652e1d\/11bedd09-9dc0-4b83-8dba-3796970c0f00_500_282.jpg",
"PresentationRootId" : "09c650cc-4a19-4c72-91c8-85f5823d652e",
"IsPublishable" : false,
"SlideFormatUrl" : "https:\/\/streams.tum.de\/Mediasite\/FileServer\/Presentation\/09c650cc4a194c7291c885f5823d652e1d\/slide_{0:D4}_500_375.jpg",
"AirDateDisplay" : "Tuesday, October 17, 2017",
"SlideCount" : 0,
@lukaskollmer
lukaskollmer / more-mute-regex.md
Last active November 7, 2017 22:09 — forked from jimmynotjim/more-mute-regex.md
Tweetbot can use regular expressions to mute tweets in your timeline and mentions.

Hashtag abuse

Three or more hashtags.

#[^#]+#[^#]+#

Long hashtags (15+ characters): #hashtagpunchline

@lukaskollmer
lukaskollmer / tum-lecture-video-link.js
Last active November 16, 2017 12:40
lil' helper for downloading tum lectures