Skip to content

Instantly share code, notes, and snippets.

from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
def data(driver, links):
data = []
for link in links:
data.append(get(driver, link))
from selenium import webdriver
def driver():
option = webdriver.ChromeOptions()
option.add_argument(' — incognito')
return webdriver.Chrome(executable_path='/path/to/chromedriver', chrome_options=option)
private function _doSocialLogin($profile, $returning = false) {
$user_exist = !empty($profile['SocialProfile']['user_id']) ? $this->User->findById($profile['SocialProfile']['user_id']) : null;
if ($user_exist && $user_exist['User']['is_registered'] == 1) {
if ($user_exist['User']['is_active'] == 1) {
if ($this->Auth->login($user_exist['User'])) {
if ($this->Auth->login()) {
@ioness
ioness / App.js
Last active May 17, 2018 04:13
redux_little_router_plus_create_react_app_problem
// App.js
import React, { Component } from 'react'
import { Fragment } from 'redux-little-router'
import logo from './logo.svg'
import './App.css'
const pdf1 = require('./pdf/4-FOR-BANK-ACCOUNT.pdf')
const pdfProblema = require('./pdf/studentfy.pdf')
import * as React from 'react'
class Test extends React.Component<any, any> {
constructor (props: any) {
super(props)
}
render () {
return <Register foo='This is '>my beloved child</Register>
}
}
import * as React from 'react'
interface Props {
indexes: [ number ],
component: any
}
export default function List (props: Props): any {
return props.indexes.map((index: number): any => {
import * as React from 'react'
interface Props {
indexes: [ number ],
component: any
}
export default function List (props: Props): any {
return props.indexes.map((index: number): any => {
import * as React from 'react'
import { Grid } from 'material-ui-next'
interface Props {
indexes: [ number ],
component: any
}
export default function List (props: Props): any {
import * as React from 'react'
interface Props {
indexes: [ number ],
component: any,
container: any
}
export default function List (props: Props): any {
// App.tsx
render () {
return <Page />
}
// Page.tsx
router () {
let path = location.pathname.split('/')[1] || '/'