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 glob = require('glob'); | |
var fs = require('fs'); | |
// Find file(s) | |
glob('**/fileName.ext', function(err, files) { | |
if (err) { throw err; } | |
files.forEach(function(item, index, array) { | |
console.log(item + ' found'); | |
// Delete file(s) | |
fs.unlink(item, function(err) { |
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 glob = require('glob'); | |
var fs = require('fs'); | |
// Find file(s) | |
glob('fileName.ext', function(err, files) { | |
if (err) { throw err; } | |
// Check for file(s) | |
if (Boolean(files.length)) { | |
files.forEach(function(item, index, array) { | |
var newItem = item.replace('regexp', 'replacement'); |
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 glob = require('glob'); | |
var fs = require('fs'); | |
// Find file(s) | |
glob('fileName.ext', function(err, files) { | |
if (err) { throw err; } | |
files.forEach(function(item, index, array) { | |
console.log(item + ' found.'); | |
// Read file(s) | |
var file = fs.readFileSync(item, 'utf8'); |
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
Show hidden characters
{ | |
"jscsVersion": "2.0.0", | |
"preset": "google", | |
"fileExtensions": [".js", "jscs"], | |
"validateQuoteMarks": true, | |
"requireParenthesesAroundIIFE": true, | |
"maximumLineLength": 120, | |
"validateLineBreaks": "LF", |
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 links = []; | |
// Replace .ext with desired filetype | |
Array.prototype.map.call(document.querySelectorAll("a[href$=\".ext\"]"), | |
function(e, i) { | |
if ((links || []).indexOf(e.href) == -1) { links.push(e.href); } | |
}); | |
console.log(links.join(" ")); | |
// Optionally copy result to clipboard |
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 links = []; | |
// Replace .ext with desired filetype | |
Array.prototype.map.call(document.querySelectorAll("a[href$=\".ext\"]"), | |
function(e, i) { | |
if ((links || []).indexOf(e.href) == -1) { links.push(e.href); } | |
}); | |
console.log(links.join(" ")); | |
// Copy result to clipboard |
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
Quick Launch: C:\Users\<User>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch | |
TaskBar: C:\Users\<User>\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar | |
Start Menu: C:\Users\<User>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs | |
Links: C:\Users\<User>\.cr3\Links |
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
@rem Do not use "echo off" to not affect any child calls. | |
@setlocal | |
@rem Get the absolute path to the current directory, which is assumed to be the | |
@rem Git installation root. | |
@for /F "delims=" %%I in ("%~dp0") do @set git_install_root=%%~fI | |
@set PATH=%git_install_root%\bin;%git_install_root%\mingw\bin;%git_install_root%\cmd;%PATH% | |
@if not exist "%HOME%" @set HOME=%USERPROFILE%\Documents\GitHub | |
@if not exist "%HOME%" @set HOME=%USERPROFILE% |
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
// Purpose: To add more social profiles | |
// Open: page.is/<username>#editProfile | |
// Run in browser console | |
document.getElementById('links_container').innerHTML = '<div class="edit_item item_custom item_connect personal_link_add"> <div class="item_inner"> <a href="#">Add link</a> </div> <span class="icon-arrow"></span> </div>'; |
OlderNewer