Skip to content

Instantly share code, notes, and snippets.

@nanoxd
nanoxd / ViewController.swift
Last active December 5, 2017 01:13
Setup UIRefreshControl
lazy var refreshControl: UIRefreshControl = {
let refreshControl = UIRefreshControl()
refreshControl.addTarget(self, action: "handleRefresh:", forControlEvents: UIControlEvents.ValueChanged)
return refreshControl
}()
@objc func handleRefresh() {
}
@nanoxd
nanoxd / fry.rb
Last active August 29, 2015 14:01
Fry, a ruby version manager for Fish
require "formula"
class Fry < Formula
homepage 'https://github.com/terlar/fry'
url 'https://github.com/terlar/fry/archive/0.1.2.tar.gz'
sha1 'b44340ff94689af0699485432189dff87730c619'
head 'https://github.com/terlar/fry.git'
depends_on 'fish'
sudo defaults write /System/Library/LaunchDaemons/com.apple.coreservices.appleevents ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.securityd ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.mDNSResponder ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchDaemons/com.apple.diskarbitrationd ExitTimeOut -int 1
sudo defaults write /System/Library/LaunchAgents/com.apple.coreservices.appleid.authentication ExitTimeOut -int 1
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')