Skip to content

Instantly share code, notes, and snippets.

View xyclos's full-sized avatar

Jake Johnson xyclos

View GitHub Profile
@xyclos
xyclos / VvJYRz.markdown
Last active November 25, 2015 16:55
VvJYRz
@xyclos
xyclos / hideShowHN.js
Last active December 18, 2015 20:37
Hide "Show HN: " when on /show
/\/show$/.test(document.location.href)&&Array.prototype.map.call(document.querySelectorAll(".deadmark + a"),function(e){e.innerHTML=e.innerHTML.replace("Show HN: ","")});
@xyclos
xyclos / ViewController.swift
Created January 14, 2016 22:11
Set image as background
import UIKit
class ViewController: UIViewController {
var imageView: UIImageView?
override func viewDidLoad() {
super.viewDidLoad()
let screenSize: CGRect = UIScreen.mainScreen().bounds
@xyclos
xyclos / ViewController.swift
Created January 14, 2016 22:31
Add tap gesture recognizer to image view.
import UIKit
class ViewController: UIViewController {
var imageView: UIImageView?
override func viewDidLoad() {
super.viewDidLoad()
let screenSize: CGRect = UIScreen.mainScreen().bounds
@xyclos
xyclos / ViewController.swift
Created January 14, 2016 22:37
Invert background image.
import UIKit
class ViewController: UIViewController {
var imageView: UIImageView?
override func viewDidLoad() {
super.viewDidLoad()
let screenSize: CGRect = UIScreen.mainScreen().bounds

Keybase proof

I hereby claim:

  • I am xyclos on github.
  • I am xyclos (https://keybase.io/xyclos) on keybase.
  • I have a public key ASBVnx2R0fi4NR-xfNbXCVNAGwUVk888uJS0yZQmxVfo6Qo

To claim this, I am signing this object:

function max(a: number, b: number): number
function copyFile(to: string, from: string)
copyFile('/tmp/backup', 'presentation.md')
copyFile('presentation.md', '/tmp/backup')
interface String {
copyTo(dest: string) : void
}
String.prototype.copyTo = function (dest: string) {
return copyFrom(dest, this.valueOf())
}
export { String as Source }
interface String {
copyTo(dest: string) : void
}
class Source extends String implements String {
copyTo(dest: string) {
return copyFile(dest, this.valueOf())
}
}