Run the two commands below one at a time to get Samba 3 installed and to have it run on boot.
Install Samba with Homebrew
brew install samba
Run the two commands below one at a time to get Samba 3 installed and to have it run on boot.
brew install samba
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.9/angular.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.9/angular-route.min.js"></script> | |
<style> | |
a, a:hover { | |
text-decoration: none; | |
} | |
#content{ | |
border:2px solid #e5e5e5; | |
overflow: hidden; |
- Open Automator | |
- File -> New -> Service | |
- Change "Service Receives" to "files or folders" in "Finder" | |
- Add a "Run Shell Script" action | |
- Change "Pass input" to "as arguments" | |
- Paste the following in the shell script box: open -n -b "com.microsoft.VSCode" --args "$*" | |
- Save it as something like "Open in Visual Studio Code" |
// Babel 2015 - ES6 | |
// Convert a complex JS Object to GraphQL Query, should handle most use cases as of 21/01/2016 | |
const o = { | |
query: { | |
fields: { | |
complex: { | |
aliasFor: "Products", | |
processArgs: { | |
coupon: (value) => { | |
return `"${JSON.stringify(value).replace(/"/g, "\\\"")}"`; // passing json string as a argument |
/** | |
* requires node.js with ES6 support, or babel | |
*/ | |
'use strict'; | |
const vm = require('vm'); | |
const fs = require('fs'); | |
const __loggers__ = {}; | |
function log(tag) { |
module.exports = function() { | |
var PORT = 33333; | |
var HOST = '127.0.0.1'; | |
var dgram = require('dgram'); | |
var server = dgram.createSocket('udp4'); | |
server.on('listening', function () { | |
var address = server.address(); | |
console.log('UDP Server listening on ' + address.address + ":" + address.port); |
<figure class="video-player"> | |
<video preload="none" width="1280" height="720" poster="video.jpg"> | |
<source src="video.webm" type="video/webm" /> | |
<source src="video.mp4" type="video/mp4" /> | |
</video> | |
<button class="play-toggle">Toggle play</button> | |
<button class="mute-toggle">Toggle mute</button> | |
</figure> | |
<script> | |
// Initialize video player |
function sudoku(puzzle) { | |
while (!isSolved(puzzle)) { | |
for (x = 0; x < 9; x++) { | |
for (y = 0; y < 9; y++) { | |
puzzle[y][x] = digit(puzzle, x, y); | |
} | |
} | |
} | |
return puzzle; |
All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.
Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.
elem.offsetLeft
, elem.offsetTop
, elem.offsetWidth
, elem.offsetHeight
, elem.offsetParent
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"
Thx to crxviewer for the magic download URL.