Skip to content

Instantly share code, notes, and snippets.

Simon Ljungberg simme

Block or report user

Report or block simme

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
simme / Install_tmux
Created Oct 19, 2011
Install and configure tmux on Mac OS X
View Install_tmux
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using (iTerm has mouse support)
Then install
# More on mouse support
simme / UNNotification+Reschdule.swift
Created Nov 17, 2016
Exntension to `UNNotification` for "snoozing" a notification.
View UNNotification+Reschdule.swift
// UNNotification+Reschedule.swift
// Meal Plan
// Created by Simon Ljungberg on 17/11/16.
// License: MIT
import UIKit
import UserNotifications
simme / UITabBarController+ToggleTabBar.swift
Created Jan 25, 2018
Extension on UITabBarController for hiding/showing the tab bar.
View UITabBarController+ToggleTabBar.swift
extension UITabBarController {
Show or hide the tab bar.
- Parameter hidden: `true` if the bar should be hidden.
- Parameter animated: `true` if the action should be animated.
- Parameter transitionCoordinator: An optional `UIViewControllerTransitionCoordinator` to perform the animation
along side with. For example during a push on a `UINavigationController`.
simme / debounce-throttle.swift
Created Dec 20, 2016
Swift 3 debounce & throttle
View debounce-throttle.swift
// debounce-throttle.swift
// Created by Simon Ljungberg on 19/12/16.
// License: MIT
import Foundation
extension TimeInterval {
simme / Label.swift
Created May 16, 2018
A `UILabel` subclass that allows content padding.
View Label.swift
// MIT License applies.
import UIKit
A `UILabel` subclass that provides a way of adding padding to the label.
open class Label: UILabel {
/// The amount of padding for each side in the label.
simme / app.js
Last active May 16, 2019
Gulp file for an Ember project using bower and browserify.
View app.js
// Load Ember into the global scope by requiring it
// Go have fun
var app = Ember.Application.create();
View ShortcutManager.swift
This sample code is available under the MIT license.
@available(iOS 12.0, *)
public final class ShortcutManager {
This enum specifies the different intents available in our app and their various properties for the `INIntent`.
Replace this with your own shortcuts.
View patterns.swift
enum MySpecialEnum {
case someCase
case someCaseWithAssociatedData(String)
case someCaseWithNumbers(Int)
func handleSpecialEnum(_ value: MySpecialEnum) {
switch value {
case .someCase:
View ParallaxHeader.swift
// ParallaxHeader.swift
// MealPlanUI
// Created by Simon Ljungberg on 2017-11-15.
// Copyright © 2017 Filibaba. All rights reserved.
import Foundation
import UIKit
View BlurrBackgroundButton.swift
public final class BlurryBackgroundButton: UIControl {
public init() {
super.init(frame: .zero)
public override init(frame: CGRect) {
super.init(frame: frame)
You can’t perform that action at this time.