This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#workbench\2e parts\2e statusbar { | |
background: #673AB7; | |
background: -webkit-linear-gradient(to left, #673AB7, #00BCD4); | |
background: linear-gradient(to left, #673AB7, #00BCD4); | |
} | |
/*#workbench\2e parts\2e statusbar { | |
/*background: #f857a6; | |
background: -webkit-linear-gradient(to left, #f857a6, #ff5858); | |
background: linear-gradient(to left, #f857a6, #ff5858); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first run brew install ffmpeg && brew install imagemagick | |
# next, add lines 6 - 9 into your .zshrc or .bashrc file, depending on your shell you use ( zsh or bash ) | |
# restart your terminal! | |
# then call like "movtogif in.mov out.gif" | |
movtogif(){ | |
ffmpeg -i "$1" -vf scale=800:-1 -r 10 -f image2pipe -vcodec ppm - |\ | |
convert -delay 5 -layers Optimize -loop 0 - "$2" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
let currentDate = NSDate() | |
let dateFormatter = NSDateFormatter() | |
// Setting the locale. | |
dateFormatter.locale = NSLocale.currentLocale() | |
//dateFormatter.locale = NSLocale(localeIdentifier: "el_GR") | |
//dateFormatter.locale = NSLocale(localeIdentifier: "fr_FR") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SKMultilineLabel.swift | |
// | |
// Created by Craig on 10/04/2015. | |
// Copyright (c) 2015 Interactive Coconut. | |
// MIT License, http://www.opensource.org/licenses/mit-license.php | |
// | |
/* USE: | |
(most component parameters have defaults) | |
let multiLabel = SKMultilineLabel(text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", labelWidth: 250, pos: CGPoint(x: size.width / 2, y: size.height / 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// SKMultilineLabel.swift | |
// | |
// Created by Craig on 10/04/2015. | |
// Copyright (c) 2015 Interactive Coconut. | |
// MIT License, http://www.opensource.org/licenses/mit-license.php | |
// | |
/* USE: | |
(most component parameters have defaults) | |
let multiLabel = SKMultilineLabel(text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", labelWidth: 250, pos: CGPoint(x: size.width / 2, y: size.height / 2)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
let uiview = UIView(frame: CGRect(x: 0, y: 0, width: 300, height: 300)) | |
func pathZigZagForView(givenView: UIView) ->UIBezierPath { | |
let width = givenView.frame.size.width | |
let height = givenView.frame.size.height | |
let givenFrame = givenView.frame | |
let zigZagWidth = CGFloat(7) | |
let zigZagHeight = CGFloat(5) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reverse Linked List | |
class Node { | |
let value: Int | |
var next: Node? | |
init(value: Int, next: Node?) { | |
self.value = value | |
self.next = next | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func sort(_ array: [Int]) -> [Int] { | |
guard array.count > 1 else { | |
return array | |
} | |
let left = Array(array[0..<array.count / 2]) | |
let right = Array(array[array.count/2..<array.count]) | |
return merge(sort(left), sort(right)) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Trend { | |
case ascending | |
case decending | |
} | |
func trend(for sequence: [Int]) -> Trend? { | |
var trend: Trend? |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// Array Intersection: Find the intersection of a given set of 3 sorted arrays | |
/// | |
/// - Parameters: | |
/// - arrayOne: the first sorted array of Integers | |
/// - arrayTwo: the second sorted array of Integers | |
/// - arrayThree: the third sorted array of Integers | |
/// - Returns: an array of intersection points within the given 3 arrays | |
func findIntersection(arrayOne: [Int], arrayTwo: [Int], arrayThree: [Int]) -> [Int] { | |
var results: [Int] = [] |
OlderNewer