The commands below assume you're using a user that can use sudo
, you're not logged in as root are you!?
First create a btsync user:
sudo useradd -M --shell /bin/false --home /var/lib/btsync
var scrollbarSize = (function() { | |
var inner = document.createElement( "div" ), | |
outer = document.createElement( "div" ); | |
inner.style.width = "100%"; | |
inner.style.height = "60px"; | |
outer.style.position = "absolute"; | |
outer.style.top = "0"; | |
outer.style.left = "0"; | |
outer.style.visibility = "hidden"; | |
outer.style.width = "50px"; |
javascript:void(function() { | |
var chars = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; | |
var password = ""; | |
for (var i = 0, length = 64; i < length; ++i) { | |
password += chars[~~(Math.random() * chars.length)]; | |
} | |
var input = document.getElementById("f773da90-5044-11e3-8f96-0800200c9a66") || document.createElement("input"); | |
if (!input.id) { | |
input.id = "f773da90-5044-11e3-8f96-0800200c9a66"; | |
input.setAttribute("style", "background:deeppink;border:2px solid #000;border-radius:.25em;box-shadow:0 0 1em .25em rgba(0,0,0,.5);color:#fff;position:fixed;top:1em;left:1em;font:16px/1 Helvetica,sans-serif;padding:.5em;z-index:9999;opacity:1;transition:opacity .5s;"); |
javascript:void(function() { | |
var metaViewport = document.querySelector("meta[name=viewport]"); | |
if (metaViewport) { | |
var content = metaViewport.getAttribute("content").replace("device-width","1024"); | |
metaViewport.setAttribute("content", content); | |
} | |
})(); |
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction |
# list deleted files | |
git log --diff-filter=D --summary | |
# find last commit that affected a file | |
git rev-list -n 1 HEAD -- path/to/filename | |
# restore one specific deleted file |
(function() { | |
var timeouts = []; | |
var messageName = "zero-timeout-message"; | |
function handleMessage(event) { | |
if (event.source === window && event.data === messageName) { | |
event.stopPropagation(); | |
if (timeouts.length > 0) { | |
var fn = timeouts.shift(); | |
fn(); |
(function() { | |
var div = document.createElement("div"); | |
div.innerHTML = "<svg/>"; | |
return !!div.firstChild && div.firstChild.namespaceURI === "http://www.w3.org/2000/svg"; | |
}()); |
(function() { | |
return !!document.createElementNS && !!document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect; | |
}()); |
var hasAnimations = (function() { | |
var propNames = ["animationName", "MozAnimationName", "webkitAnimationName", "msAnimationName"]; | |
var i = 0; | |
var length = propNames.length; | |
for (; i < length; i++) { | |
if (typeof document.documentElement.style[propNames[i]] === "string") return true; | |
} | |
return false; | |
}()); |