This file contains hidden or 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
#!/usr/bin/bash | |
set -e | |
# Loops through a hardcoded list of dbs | |
# The hard coded parts are the db names since they need to exist, and the create table command is taken manually from the mysqldump | |
transform_files () { | |
if ! [ -f ${file_src} ] | |
then | |
echo "file ${file_src} not found" |
This file contains hidden or 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
# But Why Though | |
A good article on how to do it with builtins | |
(https://www.roboleary.net/2021/11/06/vscode-you-dont-need-that-extension2.html) | |
# VSCode | |
## Default | |
Name: Dev Containers | |
Id: ms-vscode-remote.remote-containers | |
Description: Open any folder or repository inside a Docker container and take advantage of Visual Studio Code's full feature set. | |
Version: 0.327.0 |
This file contains hidden or 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
Object.defineProperty(window, 'foo', { | |
enumerable: false, | |
configurable: false, | |
writable: false, | |
value: (function() { | |
function FooUtility() {}; | |
// a Pseudo constructor which makes some protected methods which protect things | |
Object.defineProperties(FooUtility.prototype, { | |
'version': { value: 2.0 }, | |
// The following allows us to build-up a function/object and control if the properties are overwrite-able or not |
This file contains hidden or 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
const jsPubSub = { | |
subscriptions: { | |
clearTopicSubscriptions(topic) { | |
if (!this[topic]) return; | |
return delete this[topic]; | |
}, | |
}, | |
This file contains hidden or 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
class JsPubSub { | |
constructor() { | |
this.subscriptions = { | |
clearTopicSubscriptions(topic) { | |
if (!this[topic]) return; | |
delete this[topic]; | |
}, | |
}; | |
This file contains hidden or 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
javascript:(function(){ | |
let csv = [] | |
// loop through each row | |
$('#tableform').find('tr').each(function() { | |
let row = []; | |
// loop through each cell in a row | |
$(this).find('th,td').each(function() { | |
// add to the row array | |
row.push( '"' + $(this).text().trim() + '"' ); | |
}); |
This file contains hidden or 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
javascript:(function(){ | |
let csv = [] | |
// loop through each row | |
$('#tableform').find('tr').each(function() { | |
let row = []; | |
// loop through each cell in a row | |
$(this).find('th,td').each(function() { | |
// add to the row array | |
row.push( '"' + $(this).text().trim() + '"' ); | |
}); |
This file contains hidden or 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 joinObjs() { | |
// loops through all arguments and joins them together | |
const result = {}; | |
for (var i = 0, j = arguments.length; i < j; i++){ | |
Object.keys(arguments[i]) | |
.forEach(key => result[key] = arguments[i][key]); | |
} | |
return result; |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Local JS IDE</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/ace/1.4.4/ace.js"></script> | |
<style> | |
html,body { margin:0; padding:0; height:100%; width:100%; overflow: hidden;} | |
#editor { | |
height: 100%; |
This file contains hidden or 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
... and the next one... its me. |