Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Beloch CBeloch

  • Gronau / NRW / Germany
View GitHub Profile
@jordansinger
jordansinger / iPod.swift
Created Jul 27, 2020
Swift Playgrounds iPod Classic
View iPod.swift
import SwiftUI
import PlaygroundSupport
struct iPod: View {
var body: some View {
VStack(spacing: 40) {
Screen()
ClickWheel()
Spacer()
}
@mattt
mattt / UIViewControllerPreview.swift
Last active Sep 27, 2020
Generic structures to host previews of UIView and UIViewController subclasses.
View UIViewControllerPreview.swift
import UIKit
#if canImport(SwiftUI) && DEBUG
import SwiftUI
struct UIViewControllerPreview<ViewController: UIViewController>: UIViewControllerRepresentable {
let viewController: ViewController
init(_ builder: @escaping () -> ViewController) {
viewController = builder()
}
View recent-emoji.swift
import Foundation
extension Character {
var isEmoji: Bool {
return unicodeScalars.allSatisfy { $0.properties.isEmoji }
}
}
func recentlyUsedEmoji() -> [Character]? {
#if os(iOS)
View 80s-fonts-text-effect-5-css-neon-font-text-effect.markdown
@tunguskha
tunguskha / Gradient shadow in pure CSS.md
Last active Sep 21, 2020
Gradient shadow in pure CSS
View Gradient shadow in pure CSS.md

Gradient shadow in pure CSS

alt text

HTML
<button>Let's Go !</button>
@chadlavi
chadlavi / upload-sketch-to-git.sh
Last active Aug 31, 2020
shell script to work as middleware between Sketch and and git repo. syntax: 'upload.sh [filename] "optional commit message"'
View upload-sketch-to-git.sh
#!/bin/sh
# some parts of this forked from https://github.com/blended/sketch-collaboration
# cf. https://github.com/chadlavi/sketch-collaboration
if [ ! `command -v jq` ]; then
echo "you need to install jq. If you use Homebrew, try 'brew install jq'"
exit 1
fi
if [ -z "$1 ]; then
@steipete
steipete / gist:d9b44d8e9f341e81414e86d7ff8fb62d
Last active Sep 28, 2020
Using iOS 14 devices with Xcode 11.5 (instead of Xcode 12)
View gist:d9b44d8e9f341e81414e86d7ff8fb62d
// The trick is to link the DeviceSupport folder from the beta to the stable version.
// sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :)
// Support iOS 14 devices (Xcode 12.0) with Xcode 11.5:
sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/14.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
// Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions
@kylef
kylef / post-checkout.sh
Last active Dec 11, 2019
Git post-checkout hook to install CocoaPods
View post-checkout.sh
#!/bin/bash
#
### CocoaPods git-checkout hook
#
# This is a hook which you can install, it will automatically
# run `pod install` when you do a git pull/clone/checkout.
#
# The hook can be used to make CocoaPods usable with Xcode CI.
#
## Installation
View .htaccess-gdgtsDE
# .htaccess for Wordpress
# collected by Jan Kampling http://gdgts.de
# 5G BLACKLIST/FIREWALL (2013)
# @ http://perishablepress.com/5g-blacklist-2013/
# 5G:[QUERY STRINGS]
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
@FokkeZB
FokkeZB / app.js
Last active Dec 16, 2015
CommonJS module to spin a view in Titanium
View app.js
var v = Ti.UI.createView();
var s = new require('spinner').Spinner(
v, // View to spin
30 // Degrees to spin per millisecond
); // Auto-starts
// Stop
s.stop();
You can’t perform that action at this time.