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
<?php | |
/** | |
* Serves a JSON array with the contents of multiple JSON files. | |
* | |
* Scans a $path for $target JSON files in nested folders, | |
* collects the contents of each of those files and outputs | |
* them as a JSON array. | |
* ($path/{*dir}/$target) | |
* |
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($, _) { | |
if (!Function.prototype.bind) Function.prototype.bind = function(scope) { return $.proxy(this, scope); }; | |
if (!window.console) { window.console = {log : $.noop, warn: $.noop, error : $.noop}; } | |
_.templateSettings = { interpolate: /\{\{(.+?)\}\}/g }; | |
$(document).ready(function() { | |
window.portfolio = new PortfolioController(); |
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
// in Sublime Text, Preferences -> Browse Packages, find HTML-CSS-JS Prettify/scripts/node_modules/js-beautify/js/lib/beautify.js | |
// find the last line of the 'beautify' function, and place the next lines just before 'return sweet_code'; | |
// https://gist.github.com/loopmode/d091bce3b76efaf15d63 | |
// es7 decorators | |
sweet_code = sweet_code.replace(/@\n/g, '@'); | |
sweet_code = sweet_code.replace(/\)@\s/g, ')\n@'); | |
sweet_code = sweet_code.replace(/ @ /g, ' @'); | |
sweet_code = sweet_code.replace(/@\s/g, '\n@'); | |
sweet_code = sweet_code.replace(/\];@/g, '];\n@'); |
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
{ | |
"parser": "babel-eslint", | |
"env": { | |
"browser": true, | |
"node": true | |
}, | |
"plugins": [ | |
"react" | |
], | |
"ecmaFeatures": { |
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
rmdeep() { | |
cmd //c rmdeep.bat $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
>> 0.00%, compile | |
>> 10.00%, 0/1 build modules | |
>> 70.00%, 1/1 build modules | |
>> 71.00%, seal | |
>> 73.00%, optimize | |
>> 75.00%, hashing | |
>> 76.00%, create chunk assets | |
>> 78.00%, additional chunk assets | |
>> 80.00%, optimize chunk assets | |
>> 90.00%, optimize assets |
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
# audio waveformss | |
## situation | |
- we use audiosurfer.js, which renders the waveform on the client | |
- currently, v1 does not support media fragment URI queries like `?t=10,15` and we must fall back to `#t=10,15` | |
- this means that the data for the entire audio file must be transferred to and processed on the client | |
## SOLUTIONS |
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
// https://medium.com/@sheepsteak/adding-hot-module-reloading-to-create-react-app-e053fadf569d#.2q2q1mvxs | |
import React from 'react'; | |
import ReactDOM from 'react-dom'; | |
import App from './App'; | |
import './index.css'; | |
const rootEl = document.getElementById('root'); | |
ReactDOM.render( | |
<App />, | |
rootEl | |
); |
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
[ | |
{ "keys": ["ctrl+y"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} }, | |
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } }, | |
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } }, | |
{ "keys": ["ctrl+alt+p"], "command": "prompt_select_workspace" } | |
] |
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
import connectToStores from 'alt-utils/lib/connectToStores'; | |
/* eslint-disable */ | |
/** | |
* A component decorator for connecting to immutable stores. | |
* | |
* Basically a wrapper around `alt/utils/connectToStores`. | |
* Adds the necessary static methods `getStores()` and `getPropsFromStores()` to the decorated component. | |
* | |
* - Supports multiple stores. |
OlderNewer