For use after an upgrade to verify the correct working of Magento
- Activate all logs on the server (PHP, MySQL, Magento, mail, etc)
- Check meta tags in HTML
#!/bin/bash | |
# This little hack-job will grab credentials from a running openvpn process in Linux | |
# Keep in mind this won't work if the user used the --auth-nocache flag | |
grep rw-p /proc/$1/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $1 -ex "dump memory $1-$start-$stop.dump 0x$start 0x$stop"; done | |
echo "Your credentials should be listed below as username/password" | |
strings *.dump | grep -B2 KnOQ | grep -v KnOQ | |
rm *.dump --force |
The purpose of this document is to make recommendations on how to browse in a privacy and security conscious manner. This information is compiled from a number of sources, which are referenced throughout the document, as well as my own experiences with the described technologies.
I welcome contributions and comments on the information contained. Please see the How to Contribute section for information on contributing your own knowledge.
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
if [ "true" == ${ALREADYINVOKED:-false} ] | |
then | |
echo "RECURSION: Detected, stopping" | |
else | |
export ALREADYINVOKED="true" |
public extension Decodable { | |
static func randomInstance() throws -> Self { | |
let decoder = _RandomDecoder() | |
return try Self(from: decoder) | |
} | |
} | |
public class RandomDecoder { | |
public func decode<T: Decodable>(_: T.Type) throws -> T { | |
let decoder = _RandomDecoder() |
struct LoadInput<T, U> { | |
let trigger: Observable<T> /// will cause the network request to start passing the T to the request generator. | |
let makeRequest: (T) -> URLRequest /// a function that knows how to create the URLRequest | |
let download: (URLRequest) -> Observable<Data> /// the function that actually does the download. By default, it uses URLSession.shared | |
let makeObject: (Data) -> U /// a function that knows how to convert the data into the needed resource. | |
} | |
extension LoadInput { | |
init(trigger: Observable<T>, makeRequest: @escaping (T) -> URLRequest, makeObject: @escaping (Data) -> U) { | |
self.trigger = trigger |
// | |
// Created by ddrccw on 14-1-10. | |
// Copyright (c) 2014年 ddrccw. All rights reserved. | |
// refer to http://danqingdani.blog.163.com/blog/static/1860941952012102122847478/ | |
#import <sys/stat.h> | |
#import <mach-o/dyld.h> | |
//#import <stdlib.h> | |
//#import <string.h> |
extension NSObjectProtocol where Self: NSObject { | |
func observe<Value>(_ keyPath: KeyPath<Self, Value>, onChange: @escaping (Value) -> ()) -> NSKeyValueObservation { | |
return observe(keyPath, options: [.initial, .new]) { _, change in | |
// TODO: change.newValue should never be `nil`, but when observing an optional property that's set to `nil`, then change.newValue is `nil` instead of `Optional(nil)`. This is the bug report for this: https://bugs.swift.org/browse/SR-6066 | |
guard let newValue = change.newValue else { return } | |
onChange(newValue) | |
} | |
} | |
func bind<Value, Target>(_ sourceKeyPath: KeyPath<Self, Value>, to target: Target, at targetKeyPath: ReferenceWritableKeyPath<Target, Value>) -> NSKeyValueObservation { |
A number of tech news outlets, including WIRED, GigaOm, and MIT Technology Review, have recently started writing about Multipeer Connectivity ("one weird trick that the NSA hates"). Since the NSHipster article on the subject has been linked to in a lot of this coverage, I wanted to share some additional thoughts on the matter:
Multipeer Connectivity(http://nshipster.com/multipeer-connectivity/) represents a significant shift in the opposite direction of how we conventionally think about mobile applications. Nearly every app on your phone operates in a client-server model, with the device making requests to remote cloud services to send and receive messages, photos, and videos. The [