Skip to content

Instantly share code, notes, and snippets.

@MadLittleMods
MadLittleMods / svn-remove-missing.js
Last active October 1, 2015 16:24
Removes files that are missing from the repo. `node svn-remove-missing.js`
var exec = require('child_process').exec;
var svnRemoveFile = function(filePath) {
var child = exec('svn rm "' + filePath + '" --force', function(err, stdout, stderr) {
/* * /
if(err) {
console.log(err);
}
if(stderr) {

I noticed that I could no longer use SSH to git clone, push, etc in the Windows CMD prompt.

git clone no longer working with SSH

You may be getting these errors:

  • Error connecting to agent: No such file or directory
  • permission denied (publickey)

It turns out that setting a HOME environment variable will mess up the OpenSSH commands; probably because it can't find the .ssh directory(C:\Users\my_user\.ssh).

@MadLittleMods
MadLittleMods / test-sidecar-button-present.js
Last active October 13, 2015 04:50
selenium-webdriver example with browserstack.com
// See: https://www.browserstack.com/automate/node
// API: http://selenium.googlecode.com/git/docs/api/javascript/index.html
// Capabilities
// - https://www.browserstack.com/automate/capabilities
// - Capability platform/os configurator: https://docs.saucelabs.com/reference/platforms-configurator/#/
//
// How can I use selenium-webdriver package with SauceLabs?: http://stackoverflow.com/q/21170734/796832
// # Setup
//
@MadLittleMods
MadLittleMods / gulp-plugin-wrap-other-plugins.js
Last active October 13, 2015 21:55
A gulp plugin that wraps other plugins. Note: This may not be completely working. Use `gulp-piece` instead: https://www.npmjs.com/package/gulp-piece
var objectAssign = require('object-assign');
var through = require('through2');
var gutil = require('gulp-util');
var createThroughNoop = function() {
return through.obj(function(chunk, enc, cb) {
this.push(chunk);
cb();
});
var gulp = require('gulp');
var through = require('through2');
var gutil = require('gulp-util');
var buffer = require('vinyl-buffer');
var source = require('vinyl-source-stream');
var exhaustively = require('stream-exhaust');
var objectAssign = require('object-assign');
var sourcemaps = require('gulp-sourcemaps');
var browserify = require('browserify');
"rule-properties-order": [2, [
{
"-group-overview": [
"all",
"content",
"box-sizing",
"will-change",
]
},
  1. Switch your Sata Config in the BIOS. If you already have an existing Windows system, you will need to follow these steps to get the Windows driver working for RAID otherwise you will run into INACCESSIBLE_BOOT_DEVICE bleu screen error when booting
    1. Source: http://www.tenforums.com/drivers-hardware/15006-attn-ssd-owners-enabling-ahci-mode-after-windows-10-installation.html
    2. In Windows, Run Command Prompt as Admin
    3. Invoke safe mode boot with this command: bcdedit /set {current} safeboot minimal
    4. Restart the PC and enter your BIOS during bootup (DEL key)
    5. Change from AHCI to RAID mode then Save & Exit.
    6. Setup the RAID array by pressing Ctrl+I on boot -> Create RAID Volume, etc
    7. Windows 10 will then launch in Safe Mode.
    8. Once booted, Right click the Window icon and select to run the Command Prompt in Admin mode from among the various options.
  2. Cancel Safe Mode booting with the command: bcdedit /deletevalue {current} safeboot
var spacebarKey = 32;
var enterKey = 13;
var checkIfActivationEvent = function(e) {
if(e.type === 'click' || (e.type === 'keydown' && (e.keyCode === spacebarKey || e.keyCode === enterKey))) {
return true;
}
return false;
};
var gulp = require('gulp');
var through = require('through2');
gulp.task('replace-dep', function() {
var replaceDep = function() {
return through.obj(function(chunk, enc, callback) {
if(chunk.isBuffer()) {
var contents = String(chunk.contents);
@MadLittleMods
MadLittleMods / .stylelintrc
Created January 2, 2016 03:04
Plaudit .stylelintrc 2015-12-4
{
"rules": {
"string-quotes": [2, "single"],
"color-hex-case": [2, "lower"],
"color-no-invalid-hex": 2,
"number-leading-zero": [2, "always"],
"number-no-trailing-zeros": 2,
"number-zero-length-no-unit": 2,