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
[mysqld] | |
port = 3306 | |
max_allowed_packet = 256M | |
max_connect_errors = 1000000 | |
skip_external_locking | |
skip_name_resolve | |
innodb_file_per_table = 1 | |
innodb_flush_log_at_trx_commit = 0 |
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
git config core.sshCommand "ssh -i ~/.ssh/smd-dev1 -F /dev/null" |
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
const EmailValidator = require('email-deep-validator'); | |
const path = require('path'); | |
const fs = require('fs'); | |
const throat = require('throat'); | |
const emailValidator = new EmailValidator(); | |
const wait = ms => new Promise(resolve => setTimeout(resolve, ms)); | |
const retry = async (fn, retryCount = 2, intervalMs = 500, originalError = null) => { |
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
sudo certbot certonly -manual --email "[email protected]" --server "https://acme-v02.api.letsencrypt.org/directory" --agree-tos -d "*.acme.inc" |
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
@mixin transition($childClasses, $enter, $normal, $exit, $transition, $transitionExit: null) { | |
@if not ($transitionExit) { | |
$transitionExit: $transition; | |
} | |
$split-values: str-split($childClasses, ", "); | |
@each $childClass in $split-values { | |
&-enter #{$childClass}, &-appear #{$childClass} { | |
@include list($enter); | |
} |
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
openssl pkcs12 -in cert.pfx -clcerts -out cert.txt -nodes | |
# open txt and get certificate + key |
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
Link: https://cloud.ibm.com/docs/services/cloud-object-storage/cli?topic=cloud-object-storage-curl#curl-list-buckets | |
Policy to add: <CORSConfiguration><CORSRule><AllowedMethod>PUT</AllowedMethod><AllowedMethod>POST</AllowedMethod><AllowedMethod>DELETE</AllowedMethod><AllowedMethod>GET</AllowedMethod><AllowedOrigin>*</AllowedOrigin><AllowedHeader>*</AllowedHeader></CORSRule></CORSConfiguration> |
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
sudo su | |
curl -sL https://rpm.nodesource.com/setup_10.x | bash - | |
sudo yum clean all && sudo yum makecache fast | |
sudo yum install -y gcc-c++ make | |
sudo yum install -y nodejs |
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
const _ = require('lodash'); | |
const Redis = require('ioredis'); | |
const sqlBuilder = require('mongo-sql'); // from https://github.com/smddzcy/mongo-sql#master | |
const uuid = require('uuid'); | |
const throat = require('throat'); | |
const DbError = require('../error/dbError'); | |
const cast = require('../cast'); | |
const client = new CosmosClient({ endpoint: '...', key: '...' }); | |
const database = client.database('...'); |
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
onColorSwipe = (e, dx, dy, absX, absY, v) => { | |
const h = this.colorScroller.scrollHeight; | |
this.setState(state => { | |
const top = state.colorScrollerTop + state.colorScrollerDy; | |
if (-top > h * 4 / 5) { // almost at the end | |
return { colorScrollerTop: state.colorScrollerTop + h / 3, colorScrollerDy: -dy }; | |
} | |
if (-top < h / 5) { // almost at the beginning | |
return { colorScrollerTop: state.colorScrollerTop - h / 3, colorScrollerDy: -dy }; | |
} |
NewerOlder