Add remote2
as a remote
$ git remote -v
remote2 git@github.com:repo2.git (fetch)
remote2 git@github.com:repo2.git (push)
origin git@github.com:repo.git (fetch)
origin git@github.com:repo.git (push)
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
Expected Result: | |
---------------- | |
One | |
Two | |
Three | |
Four | |
Six |
The SamKnows Whitebox is a free router (TP-Link TL-WDR3600) provided by SamKnows to gather internet speed statistics. Ok that's great, but any person with a small amount of hacker's spirit will want to hack it to install some custom firmware to take advantage of the two gigantic antennas on the back, the USB ports and everything else.
Root access can be obtained via a "debug mode" on the router giving you a direct root shell via telnet, amazingly simple.
192.168.1.2
, the Subnet Mask to 255.255.255.0
and the Gateway to 192.168.1.1
./** | |
* Sets the 'selected' property on the select option(s) when the value is passed in. | |
* | |
* @method selectHelper | |
* @example | |
* // selectValue = "69" | |
* // selectValue = "69,70,71" | |
* <select> | |
* {{#selectHelper selectValue}} |
#---------------------------------------# | |
# Project Ignores # | |
#---------------------------------------# | |
# output | |
/.temp | |
/.tmp | |
/build | |
/dist |
// Say we have an Alamofire request we want to consume as an Observable.. | |
func fooAsObservable(URL: String, headers: [String: AnyObject?]) -> Observable<Foo> { | |
return create { observer in | |
let request = Alamofire(.GET, URL, headers: headers | |
.responseJSON(completionHandler: { (_, _, result) in | |
switch result { |
Not all random values are created equal - for security-related code, you need a specific kind of random value.
A summary of this article, if you don't want to read the entire thing:
Math.random()
. There are extremely few cases where Math.random()
is the right answer. Don't use it, unless you've read this entire article, and determined that it's necessary for your case.crypto.getRandomBytes
directly. While it's a CSPRNG, it's easy to bias the result when 'transforming' it, such that the output becomes more predictable.uuid
, specifically the uuid.v4()
method. Avoid node-uuid
- it's not the same package, and doesn't produce reliably secure random values.random-number-csprng
.You should seriously consider reading the entire article, though - it's
// | |
// UIViewController+Load.swift | |
// | |
// Created by Rigoberto Sáenz Imbacuán (https://www.linkedin.com/in/rsaenzi/) | |
// Copyright © 2019. All rights reserved. | |
// | |
import UIKit | |
extension UIViewController { |
/// Every view interacting with a `SayHelloViewModel` instance can conform to this. | |
protocol SayHelloViewModelBindable { | |
var disposeBag: DisposeBag? { get } | |
func bind(to viewModel: SayHelloViewModel) | |
} | |
/// TableViewCells | |
final class TextFieldCell: UITableViewCell, SayHelloViewModelBindable { | |
@IBOutlet weak var nameTextField: UITextField! | |
var disposeBag: DisposeBag? |