=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrainFuck Programming Tutorial by: Katie
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
// NSScanner+Swift.swift | |
// A set of Swift-idiomatic methods for NSScanner | |
// | |
// (c) 2015 Nate Cook, licensed under the MIT license | |
import Foundation | |
extension NSScanner { | |
// MARK: Strings |
// Xcode 6.3 defines new language features to declare nullability | |
#if __has_feature(nullability) | |
#define PSPDF_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin") | |
#define PSPDF_ASSUME_NONNULL_END _Pragma("clang assume_nonnull end") | |
#define ps_nullable nullable | |
#define ps_nonnull nonnull | |
#define ps_null_unspecified null_unspecified | |
#define ps_null_resettable null_resettable | |
#define __ps_nullable __nullable | |
#define __ps_nonnull __nonnull |
let é = "precomposed character!" | |
let é = "decomposed characters!" | |
println(é) // prints "precomposed character!" | |
println(é) // prints "decomposed characters!" |
''' | |
The MIT License (MIT) | |
Copyright (C) 2014, 2015 Seven Watt <info@sevenwatt.com> | |
<http://www.sevenwatt.com> | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. |
# bash, dash, sh, ... | |
# curl URL_OF_THIS_GIST >> ~/.profile | |
# wget URL_OF_THIS_GIST -O - >> ~/.profile | |
# | |
# zsh | |
# curl URL_OF_THIS_GIST >> ~/.zprofile | |
# wget URL_OF_THIS_GIST -O - >> ~/.zprofile | |
{ | |
echo 'with open("/proc/self/mem", "r+") as f:' | |
echo ' f.seek(id(6*9)+16)' |
find /Applications ~/Applications -maxdepth 3 -name "*.app" | while read a ; do echo; echo -n "$a ___ "; codesign -vd "${a}" 2>&1 | awk '/version/ {print $3}'; done | awk -F'___' '{print $2 " " $1}' | sort -u |
// this is a playground | |
protocol Nat { | |
class func construct() -> Self | |
class func value() -> Int | |
} | |
struct Z : Nat { | |
static func construct() -> Z { | |
return Z() | |
} |
static NSString * const CCErrorDomain = @"com.apple.commoncrypto.error"; | |
static NSString * CCDescriptionForStatus(CCCryptorStatus status) { | |
static NSString * const _CCStatusDescriptions[] = { | |
[-kCCSuccess] = @"Operation completed normally.", | |
[-kCCParamError] = @"Illegal parameter value.", | |
[-kCCBufferTooSmall] = @"Insufficent buffer provided for specified operation.", | |
[-kCCMemoryFailure] = @"Memory allocation failure.", | |
[-kCCAlignmentError] = @"Input size was not aligned properly.", | |
[-kCCDecodeError] = @"Input data did not decode or decrypt properly.", |
#!/usr/bin/python | |
# Modified by Travis Lee | |
# Last Updated: 4/21/14 | |
# Version 1.16 | |
# | |
# -changed output to display text only instead of hexdump and made it easier to read | |
# -added option to specify number of times to connect to server (to get more data) | |
# -added option to send STARTTLS command for use with SMTP/POP/IMAP/FTP/etc... | |
# -added option to specify an input file of multiple hosts, line delimited, with or without a port specified (host:port) |