View script.sh
// run from an administrator powershell
npm install --global --production windows-build-tools
View .eslintrc
{
"env": {
"browser": true,
"node": true,
"es6": true,
"amd": false
},
"ecmaFeatures": {
"jsx": true,
"superInFunctions": false,
View example.js
// imagine there's tab controllers & routes
angular.module('app', ['ionic', 'controllers']).run($rootScope => {
// Override the ionic function 'cause really the state stack is overly complex for what the browser already does
$rootScope.$ionicGoBack = () => {
window.history.back();
};
}).module('controllers', []).controller('AboutCtrl', $scope => {
// Secret sauce for forcing the button to render on a tab where it wouldn't normally render
$scope.$on('$ionicView.beforeEnter', (event, viewData) => {
viewData.enableBack = true;
View test.js
'use strict';
const Application = require('spectron').Application,
path = require('path'),
fs = require('fs'),
mkdirp = require('mkdirp'),
app = new Application(require(path.join(__dirname, 'modules', 'defaults.js'))),
folder = path.join(__dirname, 'tests'),
screenshots = path.join(__dirname, 'screenshots'),
js = /\.js$/,
View bin2dec.js
function bin2dec (arg) {
let output = 0;
arg.split("").reverse().forEach((i, idx) => {
let v = Number(i);
if (v > 0) {
output += idx > 0 ? Math.pow(2, idx) : 1;
}
});
View index.html
<!doctype html>
<html>
<head>
<title>vertical alignment</title>
<style>
html, body {
min-height: 100%;
margin: 0;
}
View example.js
// index.js
var cp = require('child_process'),
n = cp.fork(__dirname + '/sub.js'),
precise = require('precise'),
timer = precise();
n.on('message', function(m) {
timer.stop();
console.log('PARENT got message:', m);
console.log('Message received in', timer.diff() / 1000000, 'ms');
View gist:c8b2ee69480ee778b15d
[Fatal] ConsoleApp: EPIC FAIL!
NzbDrone.Core.Configuration.InvalidConfigFileException: C:\ProgramData\NzbDrone\config.xml is invalid, please see the ht
tp://wiki.sonarr.tv for steps to resolve this issue. ---> System.Xml.XmlException: '.', hexadecimal value 0x00, is an in
valid character. Line 1, position 1.
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(String res, String[] args)
at System.Xml.XmlTextReaderImpl.ThrowInvalidChar(Char[] data, Int32 length, Int32 invCharPos)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
View gist:eb9ec029a1fa3809e797
rm ~/Library/Preferences/com.oleganza.gitbox.plist
defaults delete com.oleganza.gitbox
defaults write com.oleganza.gitbox NSAppSleepDisabled -bool YES
View .js
var X = function () {
var self = this;
Object.defineProperty(self, 'abc', {get: function () { return 1; }});
};
// Extending & closing the loop
X.prototype = Array.prototype;
X.prototype.constructor = X;
// Works as you'd expect