Skip to content

Instantly share code, notes, and snippets.

View DorkNstein's full-sized avatar

Yeshwanth M DorkNstein

  • Dallas
View GitHub Profile
## DLE
#Dev
docker exec -it 6d8c14df025b /bin/bash
docker cp ./dist 6d8c14df025b:/app/client/
#Stage
docker exec -it 694a2e7eca70 /bin/bash
docker cp ./dist 694a2e7eca70:/app/client/

Create a new repo (let's call it private-repo) via the Github UI. Then:

git clone --bare https://github.com/exampleuser/public-repo.git
cd public-repo.git
git push --mirror https://github.com/yourname/private-repo.git
cd ..
rm -rf public-repo.git

Adding SSL certificate keys in aws

Use 4th option (UPLOAD certificate to IAM)

For private key: Add private key (--- BEGIN PRIVATE KEY --- **** --- END PRIVATE KEY ---)

For certificate key: Add certificate key (--- BEGIN certificate --- **** --- END certificate ---)

For certificate Chain: Add Intermediate certificate (--- BEGIN Intermediate certificate --- **** --- END Intermediate certificate ---)

# !#/usr/local/bin/python2
import numpy as np
import pandas as pd
from sklearn import datasets
import seaborn as sns
from sklearn.feature_selection import RFE
from sklearn.model_selection import train_test_split
from sklearn.model_selection import cross_val_score
from sklearn.model_selection import KFold
sudo yum update -y
sudo yum install -y git gcc-c++ openssl-devel make
git clone git://github.com/creationix/nvm.git ~/.nvm
printf "\n\n# NVM\nif [ -s ~/.nvm/nvm.sh ]; then\n\tNVM_DIR=~/.nvm\n\tsource ~/.nvm/nvm.sh\nfi" >> ~/.bashrc
NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
nvm ls-remote
nvm install v10.15.0 # (Latest LTS)
node -v
npm -v
sudo yum -y update
sudo yum install java
java -version
echo $JAVA_HOME
#If you get a null or blank output, you will need to manually set the JAVA_HOME variable.
sudo vi ~/.bash_profile
# ADD following lines
export JAVA_HOME=/usr/java/jdk1.8.0_191/
@DorkNstein
DorkNstein / gist:bde588b68919a768f4ba406e2c0b0b4e
Created October 12, 2018 21:41 — forked from rrobe53/gist:976610
Node.js File Extension Content Type
exports.ext = function () {
var extTypes = {
"3gp" : "video/3gpp"
, "a" : "application/octet-stream"
, "ai" : "application/postscript"
, "aif" : "audio/x-aiff"
, "aiff" : "audio/x-aiff"
, "asc" : "application/pgp-signature"
, "asf" : "video/x-ms-asf"
, "asm" : "text/x-asm"
ps -ef | grep java
sudo kill <ids>
cd /home/ec2-user/solr/solr-4.9.0/seventablets
sudo nohup /opt/jre1.8.0_45/bin/java -Dsolr.solr.home=multicore -jar start.jar &
@DorkNstein
DorkNstein / nodejs-import-image-module.js
Created July 18, 2018 15:01
Easy way to import local image files in nodejs.
const Module = require('module');
const fs = require('fs');
Module._extensions['.jpg'] = function(module, fn) {
let base64 = fs.readFileSync(fn).toString('base64');
module._compile('module.exports="data:image/jpg;base64,' + base64 + '"', fn);
};
Module._extensions['.png'] = function(module, fn) {
let base64 = fs.readFileSync(fn).toString('base64');
@DorkNstein
DorkNstein / bd3d4befe38185704bf0fc875e9deed6|configuration.json
Last active April 16, 2019 16:34
Visual Studio Code Settings Sync Gist
{"contents":{"eslint":{"enable":true,"autoFixOnSave":true,"validate":["javascript","javascriptreact",{"language":"typescript","autoFix":true},{"language":"typescriptreact","autoFix":true}]},"editor":{"formatOnSave":true,"tabSize":2},"html":{"format":{"wrapAttributes":"force-aligned"}},"typescript":{"format":{"insertSpaceAfterFunctionKeywordForAnonymousFunctions":false}},"javascript":{"format":{"insertSpaceAfterFunctionKeywordForAnonymousFunctions":false}},"launch":{"version":"0.2.0","configurations":[{"type":"node","request":"launch","name":"Launch via NPM","runtimeExecutable":"npm","runtimeArgs":["run-script","debug"],"port":9229},{"type":"node","request":"attach","name":"Attach by Process ID","processId":"${command:PickProcess}"},{"type":"node","request":"launch","name":"Launch Program","program":"${workspaceFolder}/index.js"}]}},"overrides":[],"keys":["eslint.enable","editor.formatOnSave","eslint.autoFixOnSave","eslint.validate","html.format.wrapAttributes","typescript.format.insertSpaceAfterFunctionKeywor