Changes with .dev domains in
mind.
Create /etc/pf.anchors/dev, containing:
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
Changes with .dev domains in
mind.
Create /etc/pf.anchors/dev, containing:
rdr pass inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
A common task when developing iOS apps is to register custom cell subclasses for both UITableView and UICollectionView. Well, that is if you don’t use Storyboards, of course.
Both UITableView and UICollectionView offer a similar API to register custom cell classes:
public func registerClass(cellClass: AnyClass?, forCellWithReuseIdentifier identifier: String)
public func registerNib(nib: UINib?, forCellWithReuseIdentifier identifier: String)No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.
Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.
| #!/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 | |
| pid=$(ps -efww | grep -v grep | grep openvpn | awk '{print $2}') | |
| echo $pid | grep rw-p /proc/$pid/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $pid -ex "dump memory $pid-$start-$stop.dump 0x$start 0x$stop"; done | |
| echo "Your credentials should be listed below as username/password" | |
| strings *.dump | awk 'NR>=3 && NR<=4 { print }' | |
| rm *.dump --force |
| /** | |
| * Remove all specified keys from an object, no matter how deep they are. | |
| * The removal is done in place, so run it on a copy if you don't want to modify the original object. | |
| * This function has no limit so circular objects will probably crash the browser | |
| * | |
| * @param obj The object from where you want to remove the keys | |
| * @param keys An array of property names (strings) to remove | |
| */ | |
| function removeKeys(obj, keys){ | |
| var index; |
| # Thanks to commenters for providing the base of this much nicer implementation! | |
| # Save and run with $ python 0dedict.py | |
| # You may need to hunt down the dictionary files yourself and change the awful path string below. | |
| # This works for me on MacOS 10.14 Mohave | |
| from struct import unpack | |
| from zlib import decompress | |
| import re | |
| filename = '/System/Library/Assets/com_apple_MobileAsset_DictionaryServices_dictionaryOSX/9f5862030e8f00af171924ebbc23ebfd6e91af78.asset/AssetData/Oxford Dictionary of English.dictionary/Contents/Resources/Body.data' | |
| f = open(filename, 'rb') |
| require 'omniauth-oauth2' | |
| # this OmniAuth-Strategy uses the Keyrock Identity Management | |
| # see http://catalogue.fiware.org/enablers/identity-management-keyrock | |
| # The server url is from the public FIWARE Lab instance. | |
| module OmniAuth | |
| module Strategies | |
| class FilabStrategy < OmniAuth::Strategies::OAuth2 | |
| option :name, "filab" | |
| option :client_options, { |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |