Skip to content

Instantly share code, notes, and snippets.

View drosenstark's full-sized avatar

Dan Rosenstark drosenstark

View GitHub Profile
@drosenstark
drosenstark / enumsInIB.swift
Last active November 1, 2015 00:55
IBInspectable, Interface Builder, Enums, Swift
enum RingPosition : Int {
case None, Outer, Inner
// not necessary to do this: case None=0, Outer=1, Inner=2
}
#if !TARGET_INTERFACE_BUILDER
@IBInspectable var ringPosition : RingPosition = .None
#else
@IBInspectable var ringPosition : Int = 0
#endif
@drosenstark
drosenstark / workflowy-with-image.js
Last active July 19, 2016 06:07 — forked from Wizmann/workflowy-with-image.js
workflowy-with-image.js
// ==UserScript==
// @name Workflowy markdown tags with images -> images
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://workflowy.com/*
// @grant none
// ==/UserScript==
@drosenstark
drosenstark / DansWorkflowyChangesForStylish.css
Last active May 4, 2016 15:18
Dan's Workflowy Changes for Stylish
/* URLs starting with https://workflowy.com/ */
/* hide share buttons */
#share_buttons,
#helpButton,
#leftGradient,
#rightGradient {
display:none;
}
@drosenstark
drosenstark / uniqueid
Created May 8, 2016 15:48
Unique ID to Clipboard for Workflowy (or whatever), OSX
#!/usr/bin/env ruby
# uiqueid generates a 4 character unique ID and puts it in the clipboard
# configurable variables
prefix = "WF-"
totalChars = 4
startPoint = 97 # use 65 for upper, 97 for lower
def pbcopy(input)
str = input.to_s
@drosenstark
drosenstark / UIImageViewWithDelayedLoad.swift
Created May 24, 2016 21:23
Top-aligning UIImageView with delayed load
class UIImageViewWithDelayedLoad : UIImageView {
var url : NSURL?
init(urlForLoadWhenFrameNotZero: NSURL) {
super.init(frame: CGRectZero)
self.url = urlForLoadWhenFrameNotZero
}
required init?(coder: NSCoder) { super.init(coder: coder) }
@drosenstark
drosenstark / workflowyPlusRefac.js
Last active November 15, 2020 14:45
Userscript to display images and iframes in Workflowy
// ==UserScript==
// @name WorkflowyPlus Refac
// @namespace http://confusionstudios.com
// @version 0.2
// @author Wizmann, DR2050
// @match https://workflowy.com/*
// @grant none
// ==/UserScript==
/* jshint -W097 */
'use strict';
@drosenstark
drosenstark / HasOwnNib.swift
Created June 20, 2016 13:42
Allows you to put a UIView inside a Nib that gets loaded from another Nib
//
// HasOwnNib.swift
// PlayingWithUI
//
// Created by dr2050 on 6/19/16.
// Copyright © 2016 Confusion Studios LLC. All rights reserved.
//
import UIKit
@drosenstark
drosenstark / DansDynalistHacks.css
Last active December 6, 2016 20:17
Dynalist.io Stylish CSS for Full-Width Document
.Document {
margin: 0px !important;
width: 100% !important;
max-width: 2500px !important;
}
.DocumentBreadcrumb {
max-width: 100% !important;
padding-left: 0px;
}
@drosenstark
drosenstark / workflowyPlusRefac2.js
Last active May 6, 2020 19:06
Userscript to lazily display images and iframes in Workflowy
// ==UserScript==
// @name WorkflowyPlus Refac 2
// @namespace http://confusionstudios.com
// @version 0.2
// @author Wizmann, DR2050
// @match https://workflowy.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
// @grant none
// ==/UserScript==
/* jshint -W097 */
// ==UserScript==
// @name Workflowy Images and iFrames
// use image:http://example.com/image.png and iframe:http://example.com/somePlace.html in your note text for Workflowy
// @namespace http://confusionstudios.com
// @version 1.1
// @author Dan Rosenstark (DR2050)
// @match https://workflowy.com/*
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js
// @require https://code.jquery.com/ui/1.12.0/jquery-ui.js
// @require https://cdn.rawgit.com/noelboss/featherlight/1.5.0/release/featherlight.min.js