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
let search_str = "l" | |
let string = "Hello World" | |
let needle:Character = search_str[search_str.startIndex] | |
let upper:String = String(needle).uppercaseString | |
var char_locations:[String] = ["-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-"] | |
for (index, character) in enumerate(Array(string)) { |
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
#!/usr/bin/env xcrun swift -i | |
import Foundation | |
import Darwin.ncurses | |
initscr() // Init window. Must be first | |
cbreak() | |
noecho() // Don't echo user input | |
nonl() // Disable newline mode | |
intrflush(stdscr, true) // Prevent flush |
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
#!/usr/bin/env python | |
# USAGE: | |
# | |
# ./add-torrent.py -t "https://downloads.raspberrypi.org/raspbian_lite_latest.torrent" -l "app" | |
# ./add-torrent.py -t "magnet:?xt=urn:btih:3b17032b53cf45fbf6861a7d32f9af5dcae2709b&dn=ipMagnet+Tracking+Link&tr=http%3A%2F%2Fipmagnet.services.cbcdn.com%3A80%2F" -l "app" | |