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
use admin | |
db.createUser({ user: "root", pwd: "root", roles: [ "root" ] }) |
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
# Updates | |
yum update -y | |
# Optional deps | |
yum install -y vim zsh pv nc zip unzip aria2 curl wget rsync | |
# EPEL | |
wget dl.fedoraproject.org/pub/epel/7/x86_64/Packages/e/epel-release-7-11.noarch.rpm -O /tmp/epel.rpm && rpm -ihv /tmp/epel.rpm && rm /tmp/epel.rpm | |
yum update -y | |
yum install -y htop |
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
import assert from 'assert'; | |
updateStepFourProps(type, operation, id) { | |
assert(Array.isArray(this.state[type]), `Cannot do operation on type '${type}'`) | |
switch (operation) { | |
case 'add': | |
this.setState({ | |
[type]: this.state[type].concat(id) | |
}) |
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
#include <util/delay.h> | |
void SevenSegment(unit8_t count) { | |
switch (count) { | |
case 0: PORT_7_SEGMENT=0b10001000; break; | |
case 1: PORT_7_SEGMENT=0b10111110; break; | |
case 2: PORT_7_SEGMENT=0b00011001; break; | |
case 3: PORT_7_SEGMENT=0b00011100; break; | |
case 4: PORT_7_SEGMENT=0b00101110; break; | |
case 5: PORT_7_SEGMENT=0b01001100; break; |
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
import idMixin from '../../mixins/id' | |
import formMixin from '../../mixins/form' | |
import formSizeMixin from '../../mixins/form-size' | |
import formStateMixin from '../../mixins/form-state' | |
import { arrayIncludes } from '../../utils/array' | |
// Import styles | |
import './form-input.css' | |
// Valid supported input types |
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
Verifying my Blockstack ID is secured with the address 1BCMkyjVYDgmUXFGBmFQm683LNiGqaD6jU https://explorer.blockstack.org/address/1BCMkyjVYDgmUXFGBmFQm683LNiGqaD6jU |
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
/** | |
* getProp - Simple lodash.get implementation | |
* @author @harish2704, @muffypl, @pi0 | |
* @param {Object} object | |
* @param {String|Array} path | |
* @param {*} defaultVal | |
*/ | |
function getProp (object, path, defaultVal) { | |
const _path = Array.isArray(path) | |
? path |
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
{ | |
// Editor | |
"editor.fontFamily": "Menlo, Monaco, 'Courier New', monospace", | |
"diffEditor.renderSideBySide": true, | |
"editor.find.autoFindInSelection": true, | |
"editor.fontLigatures": true, | |
"editor.formatOnSave": false, | |
"editor.formatOnType": true, | |
"editor.formatOnPaste": true, | |
"editor.smoothScrolling": 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
x all.zip | |
mkdir extracted && cd extracted | |
x ../all/* | |
for f in * ; do mv -v $f `echo $f | grep -oE "\d{6,}"` ; done | |
rm -rf `find . | grep -iE "jquery|owl|bootstrap|node_modules|bower|vendor|slick"` | |
moss -l javascript **/*.js |
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
wget -nv -t3 -c -nH -r -l0 -k -p -np -e robots=off --reject-regex "\/\?(.*)" [url] | |