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
function tick(time) { | |
const element = ( | |
<div> | |
<h1>Hello, world!</h1> | |
<h2>It is {time}.</h2> | |
</div> | |
); | |
ReactDOM.render(element, document.getElementById('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
function tick() { | |
const time = new Date().toLocaleTimeString(); | |
const element = ( | |
<div> | |
<h1>Hello, world!</h1> | |
<h2>It is {time}.</h2> | |
</div> | |
); | |
ReactDOM.render(element, document.getElementById('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
alias iotalog="journalctl -u iota -f" | |
alias iotainfo="curl http://localhost:14265 -X POST -H 'Content-Type: application/json' -H 'X-IOTA-API-Version: 1.4' -d '{\"command\": \"getNodeInfo\"}' | jq" | |
alias iotaneighbors="curl http://localhost:14265 -X POST -H 'Content-Type: application/json' -H 'X-IOTA-API-Version: 1.4' -d '{\"command\": \"getNeighbors\"}' | jq" |
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
<?xml version="1.0" encoding="utf-8"?> | |
<key name="Software"> | |
<key name="ConEmu"> | |
<key name=".Vanilla" modified="2016-10-10 18:25:59" build="161002"> | |
<value name="StartType" type="hex" data="02"/> | |
<value name="CmdLine" type="string" data=""/> | |
<value name="StartTasksFile" type="string" data=""/> | |
<value name="StartTasksName" type="string" data="{Bash::CygWin bash}"/> | |
<value name="StartFarFolders" type="hex" data="00"/> | |
<value name="StartFarEditors" type="hex" data="00"/> |
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 * as models from "models"; | |
import Sequelize from "sequelize"; | |
import fs from "fs"; | |
delete models.default; | |
const sequelize = new Sequelize( | |
'', | |
'', | |
'', { |
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 * as models from "models"; | |
import fs from "fs"; | |
for(let model in models) { | |
let attributes = models[model].attributes; | |
for(let column in attributes) { | |
delete attributes[column].Model; | |
delete attributes[column].fieldName; |
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
Array.from(document.querySelectorAll('*')).forEach((el) => { | |
Array.from(el.attributes).forEach((attrib) => { | |
if(attrib.localName.startsWith('ng-')) { | |
el.setAttribute(`data-${attrib.localName}`, attrib.value); | |
el.removeAttribute(attrib.localName); | |
} | |
}); | |
}); |
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 Sequelize from 'sequelize'; | |
let sequelize = new Sequelize('test', 'root', '', { | |
host: 'localhost', | |
dialect: 'sqlite', | |
storage: __dirname + '/database.sqlite', | |
logging: console.log, | |
} | |
); |
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 Sequelize from 'sequelize'; | |
let sequelize = new Sequelize('test', 'root', '', { | |
host: 'localhost', | |
dialect: 'sqlite', | |
storage: __dirname + '/database.sqlite', | |
logging: console.log, | |
} | |
); |