Skip to content

Instantly share code, notes, and snippets.

View berkcebi's full-sized avatar

Berk Çebi berkcebi

View GitHub Profile
@berkcebi
berkcebi / .hyper.js
Last active October 6, 2023 11:44
Hyper settings for Omlet
"use strict";
// Future versions of Hyper may add additional config options,
// which will not automatically be merged into this file.
// See https://hyper.is#cfg for all currently supported options.
module.exports = {
config: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: "stable",
// default font size in pixels for all tabs
@berkcebi
berkcebi / progress-indicator-spinning-color.swift
Created August 23, 2018 00:45
Changing the color of a spinning `NSProgressIndicator` using Core Image filters.
extension NSProgressIndicator {
func set(tintColor: NSColor) {
guard let adjustedTintColor = tintColor.usingColorSpace(.deviceRGB) else {
contentFilters = []
return
}
let tintColorRedComponent = adjustedTintColor.redComponent
// iOS
UIColor *color = [UIColor colorNamed:@"SillyBlue"];
// macOS
NSColor *color = [NSColor colorNamed:@"SillyBlue"];
// iOS
let color = UIColor(named: "SillyBlue")
// macOS
let color = NSColor(named: "SillyBlue")
@berkcebi
berkcebi / nib-free.swift
Last active March 15, 2017 18:31
Nib-free layout code sample
// Defining the appearance while creating the property.
let editButton: NSButton = {
let button = NSButton()
button.bordered = false
button.setButtonType(.MomentaryChange)
button.image = NSImage(named: "icEdit")
button.alternateImage = NSImage(named: "icEditSelected")
return button
@berkcebi
berkcebi / save-document-with-delegate.sketchplugin
Created November 18, 2015 06:51
save-document-with-delegate
@import 'MochaJSDelegate.js'
COScript.currentCOScript().setShouldKeepAround_(true);
var delegate = new MochaJSDelegate({
"document:didSave:contextInfo:": (function(document, didSave, contextInfo) {
[NSApp displayDialog:"Done!" withTitle:"Awesome!"];
COScript.currentCOScript().setShouldKeepAround_(false);
})
Projects - Cmd + Shift + A
Dashboard - Cmd + D
Styleguide - Cmd + G
Jump to Next Screen - →
Jump to Previous Screen - ←
Jump to Screen - Cmd + J
Show/Hide Versions - Cmd + Alt + V