Skip to content

Instantly share code, notes, and snippets.

:octocat:
_

Paul Miller paulmillr

View GitHub Profile
@paulmillr
paulmillr / iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment.md
Created Apr 7, 2018
iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment
View iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment.md

iOS, The Future Of macOS, Freedom, Security And Privacy In An Increasingly Hostile Global Environment

This post by a security researcher who prefers to remain anonymous will elucidate concerns about certain problematic decisions Apple has made and caution about future decisions made in the name of “security” while potentially hiding questionable motives. The content of this article represents only the opinion of the researcher. The researcher apologises if any content is seen to be inaccurate, and is open to comments or questions through PGP-encrypted mail.



TL;DR

View apple.js
// Compare Apple products without marketing BS.
// => http://www.apple.com/ipad/compare/
document.querySelectorAll('.device-sections tr').forEach(tr => {
const toDelete = [];
let lastGroup;
Array.from(tr.querySelectorAll('td')).forEach(td => {
const text = td.innerText.trim();
if (lastGroup === text) {
toDelete.push(td);
} else {
View nodejs-bench-tools.js
const nanoseconds = () => {
const hr = process.hrtime();
return hr[0] * 1e9 + hr[1];
};
const benches = {};
const bench = (key, action) => {
const atStart = nanoseconds();
const result = action();
const ms = (nanoseconds() - atStart) / 1000000;
@paulmillr
paulmillr / dropkick.sh
Created Dec 22, 2015
Turn off spy cams in airbnb rentals
View dropkick.sh
#!/bin/bash
#
# DROPKICK.SH
#
# Detect and Disconnect the DropCam and Withings devices some people are using to
# spy on guests in their home, especially in AirBnB rentals. Based on Glasshole.sh:
#
# http://julianoliver.com/output/log_2014-05-30_20-52
#
# This script was named by Adam Harvey (http://ahprojects.com), who also
@paulmillr
paulmillr / aws-s3-v2.rb
Created Jun 19, 2015
AWS S3 ruby v2 API usage
View aws-s3-v2.rb
require 'aws-sdk'
require 'aws-sdk-resources'
config = {region: 'us-west-1', bucket: 'test', key: 'key', secret: 'secret'}
Aws.config.update({region: config[:region], credentials: Aws::Credentials.new(config[:key], config[:secret])})
bucket = Aws::S3::Resource.new.bucket(bucket: config[:bucket])
# ============
# Create file.
obj = bucket.object(path)
View __init__.py
import reclaimer
import uploader
# Example app code is mp7sh5jd6
@paulmillr
paulmillr / grunt.js
Last active Apr 26, 2016
Gulp / grunt
View grunt.js
module.exports = function ( grunt ) {
/**
* Load required Grunt tasks. These are installed based on the versions listed
* in `package.json` when you do `npm install` in this directory.
*/
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-copy');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-concat');
@paulmillr
paulmillr / iPhone-6-plus.css
Last active Dec 1, 2017
iPhone 6 Plus & iPad Air 2 media query (Retina HD displays). Also works for similar Android devices.
View iPhone-6-plus.css
/* iPhone 6 Plus & iPad Air 2 media query (Retina HD displays).
Also works for similar Android devices. */
/* Use x2 images by default. */
.logo {
background-image: url(http://hellyeah.is/images/text-logo-ns@x2.png);
height: 300px;
width: 100%;
background-size: contain;
background-repeat: no-repeat;
background-position: center;
View stats.coffee
consolidateCategories = (cats) ->
types =
Airlines: ['Airlines, Air Carriers', 'Airlines']
ATMs: ['Automated Cash Disburse']
Hotels: ['Hotels, Motels, and Resorts', 'Hotels']
Computers: ['Computer Software Stores', 'Computer Network Services', 'Computer Programming', 'Computers, Peripherals, and Software', 'Electronics Stores']
Restaurants: ['Eating Places, Restaurants', 'Drinking Places', 'Fast Food Restaurants']
'Health, beauty, barber': ['Barber and Beauty Shops', 'Health and Beauty Spas']
'Food markets': ['Grocery Stores, Supermarkets', 'Food Stores and Specialty Markets']
Sports: ['Sports and Riding Apparel Stores', 'Sporting Goods Stores']
@paulmillr
paulmillr / filter-domains.js
Created Nov 13, 2013
Filter all available domains
View filter-domains.js
[].slice.call(document.querySelectorAll('#das_result .das_stream_item'))
.filter(function(el) {
return el.classList.contains('taken') || el.classList.contains('unavailable') || el.classList.contains('syntax') || el.dataset.domainName.split('.').length > 2;
})
.forEach(function(el) {
el.setAttribute('hidden', 'hidden');
});
You can’t perform that action at this time.