Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
// node.js proxy server example for adding CORS headers to any existing http services. | |
// yes, i know this is super basic, that's why it's here. use this to help understand how http-proxy works with express if you need future routing capabilities | |
var httpProxy = require('http-proxy'), | |
express = require('express'); | |
var proxy = new httpProxy.RoutingProxy(); | |
var proxyOptions = { | |
host: '192.168.3.11', |
* Script to record and tag spotify tracks, by Lloyd Moore *) | |
(* Make sure you are already recording in Audio Hijack Pro with a session called 'spotifySession' *) | |
tell application "Spotify" | |
set currentTrack to (current track) | |
set trackName to (name of currentTrack) | |
tell application "Audio Hijack Pro" | |
set theSession to my getSession() | |
end tell | |
repeat |
When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.
Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008
…………………………
(* Script to record and tag spotify tracks, by Lloyd Moore *) | |
(* Modified by Tiffany G. Wilson to resolve audio splitting issues, automate starting/stopping, and add recording customization *) | |
(* Snippets for controlling Spotify are from Johnny B on tumblr (http://johnnyb.tumblr.com/post/25716608379/spotify-offline-playlist) *) | |
(* The idea of using delayed tagging/filename updating is from a guest user on pastebin (http://pastebin.com/rHqY0qg9) *) | |
(* The only thing to change in the script is the output format; you must change the file extension and the recording format to match *) | |
(* Run this script once a song you want to record is queued (stopped at beginning) or playing *) | |
(* Running the script will initiate hijacking, recording and audio playback *) | |
(* To stop script, pause Spotify or wait for album/playlist to end*) | |
(* To set id3 tags, use application Kid3 (http://sourceforge.net/projects/kid3/) and copy '%{artist} - %{album} - %{track} - %{title}' from file name to Tag 2 *) |
function getViewportOffset(element) { | |
var node = element | |
, left = node.offsetLeft | |
, top = node.offsetTop | |
; | |
node = node.parentNode; | |
do { | |
var styles = getComputedStyle(node); |
Handy helpers for controlling visibility of elements until Vue has compiled.
Use like:
<div v-cloak>
<h1>
<span class="v-cloak--inline">Loading...</span> <!-- Only displayed before compiling -->
<span class="v-cloak--hidden">{{ post.title }}</span> <!-- Hidden until compiling is finished -->
-- Usage | |
-- 1. Edit the settings (see below). This step is NECESSARY the first time you use it! | |
-- 2. Run this script (this should open Audio Hijack Pro and Spotify) | |
-- | |
-- NOTE: the script assumes that each track is played entirely. You CANNOT skip tracks in Spotify. | |
-- If you do so the script will get out of sync and the resulting files contain partial or multiple songs. | |
-- You can abort a recordig session by stopping this script and ending (manually) the recording | |
-- in Audio Hijack Pro. | |
-- | |
-- You need to have "atomicparsley" installed on your system. You can install the application with |
// __tests__/example.js | |
jest.mock('fs'); | |
it('should serve as a nice example', () => { | |
const fs = require('fs') | |
// fs can be set up at any point by calling __configureFs. | |
fs.__configureFs({ | |
'/test': { |