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
#!/bin/bash | |
############################################################################################ | |
# WARNING: THESE SCRIPTS AND CHANGES ARE NOT MEANT FOR ANYBODY BUT ME. | |
# RUNNING THESE WILL MESS UP YOUR COMPUTER IN MYSTERIOUS AND USUALLY UNRECOVERABLE WAYS. | |
############################################################################################ | |
if [[ "$(sw_vers -productVersion)" != 10\.15* ]]; then | |
echo "This is only meant to run on macOS 10.15.* Catalina" >&2 | |
exit 1 |
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
/** | |
* Convenient shortcut | |
*/ | |
Object.defineProperty(window, 'define', { | |
value: (property, ...meta) => meta.length == 2 ? Object.defineProperty(meta[0], property, meta[1]) : Object.defineProperty(window, property, meta[0]), | |
writable: false, | |
enumerable: true | |
}) |
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
### Removes Node and NPM from mac OS ### | |
# Uninstall using NPM | |
npm uninstall npm -g || echo "NPM uninstall didn't work" | |
# Try if Node's installed with Brew | |
(brew uninstall node&&brew prune)||echo "Node was not installed with Brew" | |
# Remove all files and folders including Node or NPM | |
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/{npm*,node*,man1/node*} | |
rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules | |
rm -rf /usr/local/{lib/node{,/.npm,_modules},bin,share/man}/npm* | |
rm -rf /usr/local/include/node* |
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
#!/usr/bin/env ruby | |
# Usage: cat server_list.txt | ./check.rb | |
AFFECTED_VERSIONS = %r{ | |
1\.0\.2c| | |
1\.0\.2b| | |
1\.0\.1n| | |
1\.0\.1o | |
}x | |
hosts = ARGF.read | |
hosts.each_line do |host| |
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
// This script will boot app.js with the number of workers | |
// specified in WORKER_COUNT. | |
// | |
// The master will respond to SIGHUP, which will trigger | |
// restarting all the workers and reloading the app. | |
var cluster = require('cluster'); | |
var workerCount = process.env.WORKER_COUNT || 2; | |
// Defines what each worker needs to run |
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
CREATE TABLE IF NOT EXISTS `country` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`iso` char(2) NOT NULL, | |
`name` varchar(80) NOT NULL, | |
`nicename` varchar(80) NOT NULL, | |
`iso3` char(3) DEFAULT NULL, | |
`numcode` smallint(6) DEFAULT NULL, | |
`phonecode` int(5) NOT NULL, | |
PRIMARY KEY (`id`) | |
) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
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
pm list packages -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
<? | |
/* | |
* This example would probably work best if you're using | |
* an MVC framework, but it can be used standalone as well. | |
* | |
* This example also assumes you are using Predis, the excellent | |
* PHP Redis library available here: | |
* https://github.com/nrk/predis | |
*/ |