Skip to content

Instantly share code, notes, and snippets.

# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
{ [Error: Validation Error
UglifyJs Plugin Invalid Options
options.parallel should be boolean
options.parallel should be integer
options.parallel should match exactly one schema in oneOf
]
err:
[ { keyword: 'type',
@willhlaw
willhlaw / index.html
Last active April 14, 2017 20:11 — forked from anonymous/index.html
smooth div scroll 4 -trying straight forward approach
<!-- HTML below from below from http://www.smoothdivscroll.com/runningTicker.html but took out the display: none styles for the hotspots (but they are still not appearing) -->
<div id="ticker">
<div class="ticker-container">
<div id="scrollingText">
<div id="ticker-left" class="arrow">
</div>
<div class="scrollWrapper">
<div id="scrollableArea" class="container-fluid scrollableArea">
@willhlaw
willhlaw / preprocess-with-esprima-js
Created November 22, 2014 20:36
NPM Workflow to Preprocess a Javascript File
var escodegen = require('escodegen')
var through = require('through')
var esprima = require('esprima')
var modify = require('./modify') // Custom code that you write to preprocess the file
module.exports = function(file, opts) {
var buffer = []
return through(function(data) {
buffer.push(data)
@willhlaw
willhlaw / golang-dep-links
Last active August 29, 2015 14:04
Go Dependency Management and Links
@willhlaw
willhlaw / jshint.js
Created August 16, 2013 21:17
This code snippet helps in reply to a JSHINT pull request here: https://github.com/jshint/jshint/pull/1221. The code is part of a node.js file that programmatically looks through a project's files and outputs the results of jshint for each file.
//get node specific and less strict options from .jshintrc file
var jsHintOPTIONS = JSON.parse(JSON.minify(fs.readFileSync('./.jshintrc', 'utf8')));
/*Purpose: To run jsHint on a str.js
Params: error message passed up from callback caller, string is path and filename to a .js file
Output: Outputs to console a very similar output as "$ jshint myfile.js". After a file finishe with errors, script exits with code 1
Async: false - because call to readFile uses readFileSync version
*/
function hint(err, str) {
if (err) {