Author: Chris Lattner
| struct MinimalDecoder : Decoder { | |
| var codingPath = [CodingKey?]() | |
| var userInfo = [CodingUserInfoKey : Any]() | |
| public func container<Key>(keyedBy type: Key.Type) throws -> KeyedDecodingContainer<Key> { | |
| return KeyedDecodingContainer(MinimalKeyedDecodingContainer<Key>(decoder: self)) | |
| } | |
| public func unkeyedContainer() throws -> UnkeyedDecodingContainer { | |
| return DecodingContainer(decoder: self) |
This is a curated list of iOS (Swift & ObjC) frameworks which are inspired by React and Elm.
- ReactSwift by @ColinEberhardt
- https://github.com/ColinEberhardt/ReactSwift
| Rust… | |
| - is functional | |
| - but not pure, so you can printf-debug without IO() ALL THE FUNCTIONS | |
| - has a strong Hindley-Milner type system | |
| - but has convenient implicit coercions too, so you don't have to cast all over the place | |
| - safe and high-level (with ownership, static/dynamic borrowing, Send and Sync) | |
| - yet deterministic and fast with zero-/low-cost abstractions and RAII | |
| - has a standard build system and dependency management | |
| - but it doesn't force you to use it, and it has a simple Make-like CLI that doesn't hurt | |
| - lets you write your code in the 'modern' IDE of your choice with all bells and whistles |
| #!/usr/bin/python | |
| # This file has no update anymore. Please see https://github.com/worawit/MS17-010 | |
| from impacket import smb | |
| from struct import pack | |
| import sys | |
| import socket | |
| ''' | |
| EternalBlue exploit for Windows 7/2008 by sleepya | |
| The exploit might FAIL and CRASH a target system (depended on what is overwritten) |
A string identifying the build system action being performed.
The locations of any sparse SDKs that should be layered on top of the one specified by Base SDK (SDKROOT). If more than one SDK is listed, the first one has highest precedence. Every SDK specified in this setting should be a "sparse" SDK, for example, not an SDK for an entire macOS release.
| NSDate *date = [NSDate new]; | |
| NSDateFormatter *dateFormatter = [NSDateFormatter new]; | |
| dateFormatter.locale = [NSLocale localeWithLocaleIdentifier:@"nl_NL"]; | |
| dateFormatter.dateStyle = NSDateFormatterFullStyle; | |
| dateFormatter.formattingContext = NSFormattingContextDynamic; // this is the important setting | |
| NSString *dateString = [dateFormatter stringFromDate:date]; | |
| NSString *s1 = [NSString stringWithFormat:@"Foo %@", dateString]; // "Foo dinsdag 13 december 2016" |
Following the tradition from last year, here's my complete list of all interesting features and updates I could find in Apple's OSes, SDKs and developer tools that were announced at this year's WWDC. This is based on the keynotes, the "What's New In ..." presentations and some others, Apple's release notes, and blog posts and tweets that I came across in the last few weeks.
If for some reason you haven't watched the talks yet, I really recommend watching at least the "State of the Union" and the "What's New In" intros for the platforms you're interested in. The unofficial WWDC Mac app is great way to download the videos and keep track of what you've already watched.
If you're interested, here are my WWDC 2015 notes (might be useful if you're planning to drop support for iOS 8 now and start using some iOS 9 APIs).
| #!/usr/bin/env python3 | |
| import sys | |
| import requests | |
| import json | |
| emails = sys.argv[1] | |
| urlAPI = "https://haveibeenpwned.com/api/v2/breachedaccount/" | |
| user_agent = { 'User-Agent' : 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0' } |
| # The trick is to link the DeviceSupport folder from the beta to the stable version. | |
| # sudo needed if you run the Mac App Store version. Always download the dmg instead... you'll thank me later :) | |
| # Support iOS 15 devices (Xcode 13.0) with Xcode 12.5: | |
| sudo ln -s /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/15.0 /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport | |
| # Then restart Xcode and reconnect your devices. You will need to do that for every beta of future iOS versions | |
| # (A similar approach works for older versions too, just change the version number after DeviceSupport) |