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
Skip to content | |
Search… | |
All gists | |
GitHub | |
Sign up for a GitHub account Sign in | |
Create a gist now | |
Instantly share code, notes, and snippets. | |
Delete |
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 Foundation | |
class OS | |
{ | |
static func enumeratePath(let path: String)->AnyGenerator<String> | |
{ | |
let fileManager = NSFileManager.defaultManager() | |
let enumerator:NSDirectoryEnumerator? = fileManager.enumeratorAtPath(path) | |
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
var emojiMap : [ String : [String]] = [ | |
"smile|happy|laugh" : ["😀","😁","😃","😄","😆","😊","🙂","😇"], | |
"wink|kidding" : ["😉"], | |
"tasty|yum|yummy|taste" : ["😋"], | |
"cool|kewl" : ["😎"], | |
"love|luv" : ["😍","😘"], | |
"kiss" : ["😗","😙"], | |
"Hug" : ["🤗"], | |
"Think" : ["🤔"], | |
"nothing" : ["😐","😑"], |
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
self.textView.layer.borderColor = UIColor.blueColor().CGColor | |
self.textView.layer.borderWidth = 2.0 | |
self.textView.becomeFirstResponder() |
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
class Emojifier | |
{ | |
var emojiMap : [ String : [String]] = [ | |
"smile|happy|laugh" : ["😀","😁","😃","😄","😆","😊","🙂","😇"], | |
"wink|kidding" : ["😉"], | |
"tasty|yum|yummy|taste" : ["😋"], | |
"cool" : ["😎"], | |
"love" : ["😍","😘"], | |
"kiss" : ["😗","😙"], |
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
// | |
// ViewController.swift | |
// Stopwatch new | |
// | |
// Created by Samhan on 06/08/16. | |
// Copyright © 2016 Samhan. All rights reserved. | |
// | |
import UIKit |
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
from midiutil.MidiFile import MIDIFile | |
from random import randint | |
from random import randrange | |
class MIDIGenerator(object): | |
def __init__(self,fileName): | |
self.outputFileName = fileName | |
self.MIDIObject = MIDIFile(1) |
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
from midiutil.MidiFile import MIDIFile | |
from random import randint | |
from random import randrange | |
class MIDIGenerator(object): | |
def __init__(self,fileName): | |
self.outputFileName = fileName | |
self.MIDIObject = MIDIFile(1) |
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
from midiutil.MidiFile import MIDIFile | |
from random import randint | |
from random import randrange | |
class MIDIGenerator(object): | |
def __init__(self,fileName): | |
self.outputFileName = fileName | |
self.MIDIObject = MIDIFile(1) |
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
from midiutil.MidiFile import MIDIFile | |
from random import randint | |
from random import randrange | |
class MIDIGenerator(object): | |
def __init__(self,fileName): | |
self.outputFileName = fileName | |
self.MIDIObject = MIDIFile(1) |
OlderNewer