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 nano ~/.ssh/authorized_keys |
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
xclip -sel clip < ~/.ssh/id_rsa.pub |
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 reboot |
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
version: 2 | |
jobs: | |
staging: | |
docker: | |
- image: circleci/node:10 | |
steps: | |
- run: | |
name: Deploy API | |
command: ssh -o "StrictHostKeyChecking no" [email protected] "cd ~/app; git pull; yarn install --production; sudo systemctl restart dkapi" |
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 InplaceEdit from "./InplaceEdit" | |
class App extends React.Component { | |
render() { | |
return ( | |
<InplaceEdit | |
isUpdatingId={true || false} | |
id={idForTheField || ""} | |
updateKey={keyToReturnAnObjectWith || ""} | |
onUpdate={functionToCallForTheUpdate || (() => {})} |
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
<html> | |
<head> | |
<link href="./program.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<div class="app"> </div> | |
</body> | |
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 noop = () => {}; | |
export default ( | |
dispatch = noop, | |
action = {}, | |
success = noop, | |
error = noop, | |
preProcess = noop | |
) => { | |
const apiAction = dispatch(action); | |
if (apiAction.then) { |
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 start = Date.now(); | |
const today = new Date().toISOString(); | |
console.log({today}); | |
console.log({start}) | |
setTimeOut(function(){ | |
const end = Date.now(); | |
console.log({setTimeOutTook: (end - start) / 1000 }); |
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
for (var i = 0; i < 1024 * 1024; i++) { | |
process.nextTick(function () { Math.sqrt(i) } ) | |
} |
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 inputs = require("./inputs"); | |
const {initializeCharge} = require("./initializeCharge"); | |
const {validateCharge} = require("./validateCharge"); | |
const {authorizeCharge} = require("./authorizeCharge"); | |
const {validateCharge} = require("./validateCharge"); | |
const {verifyCharge} = require("./verifyCharge"); | |
// 1. Initialize a charge on the card | |
initializeCharge(inputs.cardPayload, (err, res, body) => { |