Skip to content

Instantly share code, notes, and snippets.

View muescha's full-sized avatar

Muescha muescha

View GitHub Profile
@Daan-Grashoff
Daan-Grashoff / google_search_maps_addon.js
Last active April 19, 2024 13:04
Bring back the google maps button when searching on google
// ==UserScript==
// @name Google maps addon
// @namespace http://tampermonkey.net/
// @version 2024-03-21
// @description Bring google maps button back
// @author You
// @match https://www.google.com/search*
// @include https://www.google.tld/search*
// @icon https://www.google.com/images/branding/googleg/1x/googleg_standard_color_128dp.png
// @grant none
@luckman212
luckman212 / popper.lua
Last active January 31, 2022 05:42
quick popup note window for Hammerspoon
-- popper.lua
-- https://www.hammerspoon.org/docs/hs.webview.html
src=[[<html>
<head>
<style>
::-webkit-scrollbar {
background: #2d2e26;
width: 8px;
@LilithWittmann
LilithWittmann / autobahn.md
Last active October 26, 2023 12:11
autobahn.md
@kiliankoe
kiliankoe / MapView.swift
Created September 30, 2019 20:10
3D MapKit Views
import SwiftUI
struct MapView: UIViewRepresentable {
var coordinate: CLLocationCoordinate2D
func makeUIView(context: Context) -> MKMapView {
MKMapView(frame: .zero)
}
func updateUIView(_ view: MKMapView, context: Context) {
@shaps80
shaps80 / Scheduling-AppDelegate.swift
Last active February 16, 2022 03:14
NSNotification Scheduling Service in Swift. (the only required file is `SchedulingService.swift`)
//
// AppDelegate.swift
// Scheduling
//
// Created by Shaps Benkau on 19/02/2018.
// Copyright © 2018 152percent Ltd. All rights reserved.
//
import UIKit
@therealmarv
therealmarv / init.lua
Created November 21, 2017 14:28
hammerspoon Umlaute
-- Umlaute
hs.hotkey.bind({'alt'}, 'u', function ()
hs.eventtap.keyStrokes('ü')
end)
hs.hotkey.bind({'shift', 'alt'}, 'u', function ()
hs.eventtap.keyStrokes('Ü')
end)
@leojkwan
leojkwan / NativeObservable.swift
Created May 5, 2017 05:33
Native Observable Pattern in Swift
import UIKit
class PushedViewController: UIViewController {
var currentWeather: Observable<Double>!
private let disposeBag = MyDisposeBag()
override func viewDidLoad() {
super.viewDidLoad()
@JadenGeller
JadenGeller / Cluster.swift
Created March 13, 2017 01:27
Class Cluster
class Number /* class cluser */ {
class Int8: Number {
var value: Swift.Int8
init(_ value: Swift.Int8) { self.value = value }
}
class Int: Number {
var value: Swift.Int
init(_ value: Swift.Int) { self.value = value }
}
extension Sequence {
func reduce<A>(_ initial: A, combine: (inout A, Iterator.Element) -> ()) -> A {
var result = initial
for element in self {
combine(&result, element)
}
return result
}
}