- Deauthorize your iTunes store account. (You should also deauthorize any third-party apps, such as Photoshop, that are locked to your Mac).
- Turn off FileVault (if you are using it).
- Sign out of iCloud.
- Restart the Mac in Recovery Mode (hold down
Command + R
key during restart). - Use Disk Utility to erase the hard drive. Click on
Disk Utility > Continue
. Select the Main volume and clickUnmount
thenErase
). Quit Disk Utility (Disk Utility > Quit Disk Utility
). - Click
Reinstall OS X
andContinue
. Follow the instructions to reinstall Mac OS X.
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
// All webpack chunks have an identifier that is written to both the chunk and | |
// the chunk manifest. | |
// | |
// By default, webpack uses "int" identifiers, where the identifiers are | |
// sequentially generated after chunks are ordered by OccurenceOrderPlugin. | |
// | |
// The result of this is that small code changes may cause chunks to be | |
// reordered, leading to a cascading change of chunk ids, and a large number of | |
// chunk rehashes that could have been avoided. | |
// |
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
'use strict'; | |
const autoprefixer = require('autoprefixer'); | |
const ExtractTextPlugin = require('extract-text-webpack-plugin'); | |
const path = require('path'); | |
const { | |
CheckerPlugin, | |
TsConfigPathsPlugin, | |
} = require('awesome-typescript-loader'); | |
const HappyPack = require('happypack'); |
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
_registry = {}; | |
importPolyfill = path => { | |
if(!(path in _registry)) { | |
const entry = _registry[path] = {}; | |
entry.promise = new Promise(resolve => entry.resolve = resolve); | |
document.head.appendChild(Object.assign( | |
document.createElement('script'), | |
{ | |
type: 'module', | |
innerText: `import * as X from '${path}'; _registry['${path}'].resolve(X);`, |
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 OR REPLACE FUNCTION slugify(str text) RETURNS text AS $$ | |
BEGIN | |
RETURN regexp_replace( | |
lower(translate(str, | |
'äëïöüáéíóúâêîûôåãõàèìòùřšěčůńýśćłęążźĄŃÝŚĆŁĘÄËÏÖÜÁÉÍÓÚÂÊÎÛÔÅÃÕÀÈÌÒÙŘŠĚČŮŻŹß ²ø®', | |
'aeiouaeiouaeiouaaoaeioursecunyscleazzANYSCLEAEIOUAEIOUAEIOUAAOAEIOURSECUZzs-2dR' | |
-- missing chars will be removed | |
)), | |
-- strip all others chars than [^a-z0-9 \-] | |
'[^a-z0-9 \-]', |
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
const MODULE_DIR = /(.*([\/\\]node_modules|\.\.)[\/\\](@[^\/\\]+[\/\\])?[^\/\\]+)([\/\\].*)?$/g; | |
{ | |
loader: 'babel-loader', | |
test: /\.jsx?$/, | |
include(filepath) { | |
if (filepath.split(/[/\\]/).indexOf('node_modules')===-1) return true; | |
let pkg, manifest = path.resolve(filepath.replace(MODULE_DIR, '$1'), 'package.json'); | |
try { pkg = JSON.parse(fs.readFileSync(manifest)); } catch (e) {} | |
return !!(pkg.module || pkg['jsnext:main']); |
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
var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' + | |
'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' + | |
'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' + | |
': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));'; | |
try { | |
eval(str); | |
} catch(e) { | |
alert('Your browser does not support ES6!') | |
} |
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
FROM node | |
RUN mkdir -p /app | |
WORKDIR /app | |
# .deps.json will only bust the cache when the package.json dependencies change | |
COPY .deps.json /app/package.json | |
RUN npm install | |
# cache will almost always bust here, but it's only copying files |
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
/** | |
* Using Operator Mono in Atom | |
* | |
* 1. Open up Atom Preferences. | |
* 2. Click the “Open Config Folder” button. | |
* 3. In the new window’s tree view on the left you should see a file called “styles.less”. Open that up. | |
* 4. Copy and paste the CSS below into that file. As long as you have Operator Mono SSm installed you should be golden! | |
* 5. Tweak away. | |
* | |
* Theme from the screenshot (http://cdn.typography.com/assets/images/blog/operator_ide2.png): |
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
// This example shows the difference | |
// between classNames, classNames/bind and classnames-loader | |
// submit-button.css | |
/* | |
:local .className { | |
color: green; | |
background: red; | |
} |