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
SELECT DISTINCT TABLE_NAME | |
FROM INFORMATION_SCHEMA.COLUMNS | |
WHERE COLUMN_NAME IN ('columnA','ColumnB') | |
AND TABLE_SCHEMA='YourDatabase'; | |
-- OR: | |
SELECT DISTINCT TABLE_NAME | |
FROM INFORMATION_SCHEMA.COLUMNS | |
WHERE COLUMN_NAME LIKE '%columnA%' |
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
On Error Resume Next | |
Dim fso, StdOut, folders, files, ext | |
folders = Array(_ | |
"c:\",_ | |
"c:\users"_ | |
) | |
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
FOR /f %%i in ('schtasks /query ^| FINDSTR stringToRemove') do schtasks /Delete /TN "%%i" /F |
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 isOdd(number) { | |
return !!(number & 1); | |
} | |
isOdd(1); // true, 1 is odd | |
isOdd(2); // false, 2 is not odd | |
isOdd(357); // true, 357 is odd |
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
SELECT * | |
FROM information_schema.processlist; | |
SELECT concat('KILL ',id,';') | |
FROM information_schema.processlist | |
WHERE COMMAND = 'Sleep'; |
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
UPDATE mysql.user SET Password=PASSWORD('MyNewPass') WHERE User='root'; | |
FLUSH PRIVILEGES; |
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
//PSEUDOCODE!! | |
function fisher_yates_shuffle(items): | |
for(i in _.range(items.length)){ | |
var randomIndex = random.randint(i, len(items)-1) | |
temp = items[randomIndex] | |
items[randomIndex] = items[i] | |
items[i] = temp | |
} | |
return items |
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 Promise = require('bluebird'); | |
// waterfall | |
Promise.sequence = function (tasks) { | |
var current = Promise.cast(); | |
for (var k = 0; k < tasks.length; ++k) { | |
current = current.then(tasks[k]); | |
} | |
return current; | |
}; |
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
Promise.prototype['finally'] = function finallyPolyfill(callback) { | |
var constructor = this.constructor; | |
return this.then(function(value) { | |
return constructor.resolve(callback()).then(function() { | |
return value; | |
}); | |
}, function(reason) { | |
return constructor.resolve(callback()).then(function() { | |
throw reason; |
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
printf "\x1f\x8b\x08\x00\x00\x00\x00\x00" |cat - metadata |gzip -dc %1 >> %1.json | |
rm %1 |
OlderNewer