Skip to content

Instantly share code, notes, and snippets.

View bitops's full-sized avatar

Sebastian Wittenkamp bitops

View GitHub Profile
import SwiftUI
extension CGPoint {
static func *(lhs: Self, rhs: CGFloat) -> Self {
.init(x: lhs.x * rhs, y: lhs.y * rhs)
}
}
// Idea: https://www.framer.com/showcase/project/lo2Qka8jtPXrjzZaPZdB/
//
// ContentView.swift
// MadeForYouCard
//
// Created by AppleDesignDev on 1/24/22.
//
import SwiftUI
struct ContentView: View {
@lpbas
lpbas / FadeView.swift
Last active October 21, 2024 08:48
Fade a UIView in iOS using Gradient (Swift Extension)
//
// This program is free software. It comes without any warranty, to
// the extent permitted by applicable law. You can redistribute it
// and/or modify it under the terms of the Do What The Fuck You Want
// To Public License, Version 2, as published by Sam Hocevar. See
//
// http://sam.zoy.org/wtfpl/COPYING
//
// for more details.
//
@bitops
bitops / richhickey.md
Created April 18, 2018 03:18 — forked from prakhar1989/richhickey.md
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@ufuk
ufuk / ApplicationContextHolder.java
Last active December 17, 2022 14:16 — forked from baybatu/getting-spring-bean-from-unmanaged-area.java
Utility bean for getting Spring beans from static context.
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;
@Component
public class ApplicationContextHolder implements ApplicationContextAware {
private static ApplicationContext applicationContext;
@JoshuaSullivan
JoshuaSullivan / ColorCubeHelper-swift2.swift
Last active September 12, 2024 10:24
Here are the Swift 2.3 and Swift 3.0 versions of the ColorCubeHelper class.
//
// ColorCubeHelper.swift
//
// Created by Joshua Sullivan on 10/01/16.
// Copyright © 2016 Joshua Sullivan. All rights reserved.
//
import UIKit
import Accelerate
@graceavery
graceavery / harryPotterAliases
Last active September 20, 2024 22:13
bash aliases for Harry Potter enthusiasts
alias accio=wget
alias avadaKedavra='rm -f'
alias imperio=sudo
alias priorIncantato='echo `history |tail -n2 |head -n1` | sed "s/[0-9]* //"'
alias stupefy='sleep 5'
alias wingardiumLeviosa=mv
alias sonorus='set -v'
alias quietus='set +v'
anonymous
anonymous / debugging.txt
Created May 11, 2016 18:51
Standard debugging email help
Hello, I'm glad you contacted me asking for help. In order to help you help
yourself I have crafted this fine little automated email with information and
things you should try before asking for help. When you run into a problem I
want you to do the following things before you email me, and then email me your
answers. Doing this will most likely help you solve the problem on your own,
and will save me time in the long run. If after doing this you are truly
stuck and you can answer all these questions then email me your answers and
I'll help you.
1. Do you have a screenshot of the error you are getting?
@JoshuaSullivan
JoshuaSullivan / ColorCubeImageCreator-swift2.swift
Last active April 25, 2023 16:45
The Color Cube Image Creator creates the specially formatted images needed to create data for the CIColorCube filter.
//
// ColorCubeImageCreator.swift
// ColorCubeImageCreator
//
// Created by Joshua Sullivan on 4/25/16.
// Copyright © 2016 Joshua Sullivan. All rights reserved.
//
import UIKit
@kevinelliott
kevinelliott / osx-10.11-setup.md
Last active September 5, 2024 01:54
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist https://gist.github.com/kevinelliott/0726211d17020a6abc1f). Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.