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 React, {Component, Fragment} from 'react' | |
import styles from './styles.css' | |
import {HashRouter as Router, Link} from 'react-router-dom' | |
const sqlite = require('sqlite3').verbose(); | |
const db = new sqlite.Database('/Users/converge/Documents/workspace/duffgram-engine/db/duffgram.db') | |
export default class Dashboard extends Component { | |
constructor() { |
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
WARNING in ./node_modules/sqlite3/lib/sqlite3.js 4:14-35 | |
Critical dependency: the request of a dependency is an expression | |
@ ./app/src/components/Dashboard/index.jsx | |
@ ./app/src/renderer_process.js | |
WARNING in ./node_modules/node-pre-gyp/lib/pre-binding.js 20:23-49 | |
Critical dependency: the request of a dependency is an expression | |
@ ./node_modules/node-pre-gyp/lib/node-pre-gyp.js | |
@ ./node_modules/sqlite3/lib/sqlite3.js | |
@ ./app/src/components/Dashboard/index.jsx |
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
ERROR in ./node_modules/integer/build/integer.node 1:0 | |
Module parse failed: Unexpected character '�' (1:0) | |
You may need an appropriate loader to handle this file type. | |
(Source code omitted for this binary file) | |
@ ./node_modules/integer/lib/index.js 3:33-65 | |
@ ./node_modules/better-sqlite3/lib/index.js | |
@ ./app/src/components/Dashboard/index.jsx | |
@ ./app/src/renderer_process.js | |
ERROR in ./node_modules/better-sqlite3/build/better_sqlite3.node 1:0 |
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 React, {Component, Fragment} from 'react' | |
import styles from './styles.css' | |
import {HashRouter as Router, Link} from 'react-router-dom' | |
export default class Dashboard extends Component { | |
constructor() { | |
super(); | |
this.state = { | |
data: [ |
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 render = (Component) => { | |
ReactDOM.render( | |
<Component />, | |
document.getElementById('reactbody'), | |
); | |
}; | |
render(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
# | |
# MAIN.JS | |
# | |
const { app, BrowserWindow } = require('electron') | |
require('electron-reload') | |
let win | |
function createWindow() { |
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
# VIEW | |
def setup_schedule(request): | |
if request.method == 'POST': | |
form = SetupScheduleForm(request.POST) | |
context = {'setup_schedule_form': form} | |
if form.is_valid(): | |
form.save() | |
return redirect('/setup', context) | |
else: | |
form = SetupScheduleForm(instance=None) |
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
def fake_sleep(self, min, max): | |
time_to_sleep = randint(min, max) | |
try: | |
print('fake sleeping {} secs'.format(time_to_sleep)) | |
WebDriverWait(self.browser, time_to_sleep).until( | |
EC.presence_of_element_located( | |
(By.XPATH, "//input[@id='non_existent_xpath']")) | |
) | |
except Exception: | |
pass |
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
body = self.browser.find_element_by_xpath('//body') | |
self.browser.execute_script( | |
"window.open('{}', '_blank')".format('http://www.osnews.com')) | |
--- | |
body = self.browser.find_element_by_xpath('//body') | |
body.send_keys(Keys.CONTROL + 't') | |
print('new tab') | |
body.send_keys(Keys.CONTROL + Keys.TAB) |
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
body = self.browser.find_element_by_xpath('//body') | |
self.browser.execute_script( | |
"window.open('{}', '_blank')".format('http://www.osnews.com')) | |
--- | |
body = self.browser.find_element_by_xpath('//body') | |
body.send_keys(Keys.CONTROL + 't') | |
print('new tab') | |
body.send_keys(Keys.CONTROL + Keys.TAB) |