Note
to active Office without crack, just follow https://github.com/WindowsAddict/IDM-Activation-Script,
you wiil only need to run
irm https://massgrave.dev/ias | iex
// | |
// Future+NilMap.swift | |
// Created on 3/10/19 | |
// | |
import Async | |
public protocol OptionalConstrainable { | |
associatedtype Element | |
var asOptional: Optional<Element> { get } |
import Vapor | |
import SwiftProtobuf | |
import Foundation | |
extension Request { | |
public func decodeMessage<M: SwiftProtobuf.Message>(_ type: M.Type = M.self) throws -> M { | |
let data = http.body.data ?? Data() | |
if http.contentType == MediaType.json { | |
return try M(jsonUTF8Data: data) |
import Fluent | |
func fetchChildren<Parent, ParentID, Child: Model, Result>( | |
of parents: [Parent], | |
idKey: KeyPath<Parent, ParentID?>, | |
via reference: KeyPath<Child, ParentID>, | |
on conn: DatabaseConnectable, | |
combining: @escaping (Parent, [Child]) -> Result) -> Future<[Result]> where ParentID: Hashable & Encodable { | |
let parentIDs = parents.compactMap { $0[keyPath: idKey] } | |
let children = Child.query(on: conn) |
import PostgreSQL | |
typealias PostgreSQLQueryRow = [PostgreSQLColumn: PostgreSQLData] | |
extension Dictionary where Key == PostgreSQLColumn, Value == PostgreSQLData { | |
func decode<T>(_ key: String) throws -> T where T: PostgreSQLDataConvertible { | |
guard let v = try firstValue(forColumn: key)?.decode(T.self) else { | |
throw PostgreSQLError(identifier: "decodingError", reason: "Unable to decode \"\(key)\" column ", source: .capture()) | |
} | |
return v |
Note
to active Office without crack, just follow https://github.com/WindowsAddict/IDM-Activation-Script,
you wiil only need to run
irm https://massgrave.dev/ias | iex
function myappdocdir() { | |
devid=$(xcrun simctl list devices | grep Booted | sed -n 's/^.*\([A-F0-9]\{8\}-\([A-F0-9]\{4\}-\)\{3\}[A-F0-9]\{12\}\).*$/\1/p') | |
for folder in ~/Library/Developer/CoreSimulator/Devices/$devid/data/Containers/Data/Application/*; do | |
if [[ -a $folder/.com.apple.mobile_container_manager.metadata.plist ]]; then | |
if [[ 'com.apple.phone' = $(/usr/libexec/PlistBuddy -c 'Print :MCMMetadataIdentifier' $folder/.com.apple.mobile_container_manager.metadata.plist) ]]; then | |
echo $folder | |
break | |
fi | |
fi | |
done |
vi /etc/environment | |
add these lines... | |
LANG=en_US.utf-8 | |
LC_ALL=en_US.utf-8 |
// The 6 ways to uwnrap optionals in Swift 2.0 | |
// | |
// Created by Patrick Lynch on 6/28/15. | |
// Copyright © 2015 Patrick Lynch. All rights reserved. | |
import Foundation | |
// 1. Force Unwrapping | |
// 2. Optional Binding | |
// 3. Optional Chaining |
<?php | |
// Server file | |
class PushNotifications { | |
// (Android)API access key from Google API's Console. | |
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI'; | |
// (iOS) Private key's passphrase. | |
private static $passphrase = 'joashp'; | |
// (Windows Phone 8) The name of our push channel. | |
private static $channelName = "joashp"; |