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
for d in `find -name node_modules -type d` ; do [ -d "$d" ] && echo "$d" && rm -rf "$d" ; done |
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 Agent = require('agentkeepalive') | |
require('http').globalAgent = new Agent() | |
require('https').globalAgent = new Agent.HttpsAgent() |
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
{ | |
// Editor | |
"diffEditor.renderSideBySide": true, | |
"editor.fontFamily": "Anonymous, InputMono, Menlo, Monaco, 'Courier New', monospace", | |
"editor.find.autoFindInSelection": true, | |
"editor.fontLigatures": true, | |
"editor.formatOnSave": false, | |
"editor.formatOnType": true, | |
"editor.formatOnPaste": true, |
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
# Deps | |
sed -i "s|# deb-src|deb-src|" /etc/apt/sources.list | |
apt update | |
export DEPS=" \ | |
build-essential zlib1g-dev libpcre3-dev unzip uuid-dev \ | |
debhelper po-debconf libexpat-dev libgd-dev libgeoip-dev libhiredis-dev \ | |
libluajit-5.1-dev libmhash-dev libpam0g-dev libperl-dev libssl-dev libxslt1-dev quilt" | |
apt install -y $DEPS | |
# NXG Pagespeed |
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
ssh -vo ProxyCommand='ssh -W %h:%p root@proxy_host' root@dst_host |
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
use admin | |
db.createUser({ user: "root", pwd: "root", roles: [ "root" ] }) |
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
# 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 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
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 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
#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 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
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 |