This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- See the most up to date version here where it says "Download the mrc-converter-suite zip archive" https://discussions.agilebits.com/discussion/30286/mrcs-convert-to-1password-utility/p1 | |
-- | |
-- Exports Safari's saved passwords to a CSV file formatted for use with the convert_to_1p4's csv converter | |
-- | |
-- Version 1.4 | |
-- mike (at) cappella (dot) us | |
-- | |
use AppleScript version "2.5" -- runs on 10.11 (El Capitan) and later | |
use scripting additions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a Journaled HFS+ disk image on the drive | |
# Size is limited to 250GB but you can change that | |
# Volume name is TM | |
# The image name is TimeMachine | |
# Note this image is not encrypted. Save this image to an encrypted volume. | |
hdiutil create -size 250gb -layout GPTSPUD -fs "Journaled HFS+" -volname "TM" -type SPARSEBUNDLE -nospotlight -tgtimagekey sparse-band-size=262144 /Volumes/T7/TimeMachine.sparsebundle | |
# Mount the disk image and then set TimeMachine to use the new disk | |
sudo tmutil setdestination /Volumes/TM/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
get_title () { | |
attr='title' | |
fileloc=`unzip -l "$1" | ggrep -Po '\b[^\s-]*\.opf\b'` | |
metafound=`zipgrep '<dc:'$attr'(.+)>(.+)</dc:'$attr'>' "$1" $fileloc` | |
echo `expr "$metafound" : '.*<dc:'$attr'.*>\(.*\)</dc:'$attr'>.*'` | |
} | |
for file in $(find . -type f -depth 1 -name "*.epub"); do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Trianglify Background Generator</title> | |
<style> | |
html, body { | |
margin: 0; | |
padding: 0; | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo fdesetup authrestart | |
# It will ask for: | |
# 1. the sudo password | |
# 2. the drive password or recovery key | |
# -delayminutes <minutes> Number of minutes before restart. | |
# -1 to set the key but allow something like a software update the restart the computer. | |
sudo fdesetup authrestart -delayminutes -1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function trueTypeOf (obj) { | |
return {}.toString.call(obj).split(' ')[1].slice(0, -1).toLowerCase(); | |
} | |
console.log(trueTypeOf()); //undefined | |
console.log(trueTypeOf(null)); //null | |
console.log(trueTypeOf(NaN)); //number | |
console.log(trueTypeOf(5)); //number | |
console.log(trueTypeOf({})); //object | |
console.log(trueTypeOf([])); //array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(window, document) { | |
'use strict'; | |
/* global getEventListeners */ | |
window.listenerCount = 0; | |
var ael = Node.prototype.addEventListener; | |
Node.prototype.addEventListener = function() { | |
window.listenerCount++; | |
window.console.log('add', arguments); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://code.jquery.com/jquery.min.js"></script> | |
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
<style id="jsbin-css"> |
NewerOlder