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
#!/bin/sh | |
tables=`mysql -hNAME_OF_YOUR_SOURCE_DB_HOST -uTYPE_YOUR_DB_USER -pTYPE_YOUR_PASSWORD -e "use NAME_OF_YOUR_SOURCE_DB_HOST; SHOW TABLES";` | |
for table in $tables | |
do | |
mysqldump -hNAME_OF_YOUR_SOURCE_DB_HOST -uTYPE_YOUR_DB_USER -pTYPE_YOUR_PASSWORD NAME_OF_YOUR_SOURCE_DB $table --where="1 limit 1000" > "$table".sql | |
done | |
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 Wappalyzer = require('wappalyzer'); | |
const urls = process.argv.slice(2); | |
(async function() { | |
const wappalyzer = await new Wappalyzer() | |
try { | |
await wappalyzer.init() | |
const results = await Promise.all( | |
urls.map(async (url) => ({ | |
url, | |
results: await wappalyzer.open(url).analyze() |
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
========= store ========= | |
import {applyMiddleware, compose, createStore} from 'redux'; | |
import {createLogger} from 'redux-logger'; | |
import {composeWithDevTools} from 'redux-devtools-extension'; | |
import {promiseMiddleware, localStorageMiddleware} from './middleware'; | |
import reducer from './reducer'; | |
const getMiddleware = () => { | |
if (process.env.NODE_ENV === 'production') { |
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 React, {Component, Fragment} from 'react'; | |
export default class Contact extends Component { | |
render() { | |
return ( | |
<Fragment> | |
Contact Us | |
</Fragment> | |
) | |
} |
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 React, {Component} from 'react'; | |
import {StyleSheet, SafeAreaView} from 'react-native'; | |
import {connect} from 'react-redux'; | |
import {ApplicationProvider, Divider, Icon, ListItem} from "@ui-kitten/components"; | |
import {light as theme, mapping} from "@eva-design/eva"; | |
import {LOGOUT} from "../constants/actionTypes"; | |
import {store} from '../store'; | |
import AsyncStorage from "@react-native-community/async-storage"; | |
const HomeIcon = (style) => ( |
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
{ | |
"model": { | |
"ssd": { | |
"num_classes": 90, | |
"box_coder": { | |
"faster_rcnn_box_coder": { | |
"y_scale": 10, | |
"x_scale": 10, | |
"height_scale": 5, | |
"width_scale": 5 |
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
<template> | |
<div> | |
<!-- Main Content --> | |
<div class="hk-pg-wrapper"> | |
<!-- Container --> | |
<div class="container-fluid mt-xl-50 mt-sm-30 mt-15"> | |
<!-- Title --> | |
<div class="hk-pg-header"> | |
<h4 class="hk-pg-title"> | |
<span class="pg-title-icon"> |
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
[2019-04-30 09:38:41] local.ERROR: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select * from `users` where `id` = 225 limit 1) (View: /Users/shahrukh/Sites/podcasts/resources/views/vendor/spark/layouts/app.blade.php) (View: /Users/shahrukh/Sites/podcasts/resources/views/vendor/spark/layouts/app.blade.php) {"userId":225,"exception":"[object] (ErrorException(code: 0): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select * from `users` where `id` = 225 limit 1) (View: /Users/shahrukh/Sites/podcasts/resources/views/vendor/spark/layouts/app.blade.php) (View: /Users/shahrukh/Sites/podcasts/resources/views/vendor/spark/layouts/app.blade.php) at /Users/shahrukh/Sites/podcasts/vendor/laravel/framework/src/Illuminate/Database/Connection.php:664, ErrorException(code: 0): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'id' in 'where clause' (SQL: select * from `users` where `id` = 225 limit 1) (View: /Users/shahrukh/Sites/podcasts/resou |
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
================================================================== | |
CREATE GZIP BACKUP OF ALL YOUR DATABASES EXCEPT INFORMATION_SCHEMA | |
================================================================== | |
#!/bin/sh | |
databases=`mysql -uDATABASE_USER -pDATABASE_PASSWORD -e "SHOW DATABASES;"` | |
for database in $databases | |
do |
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
def fetch_mentions(tweet): | |
mentions = [] | |
new_mentions = tweet.split(' ') | |
if new_mentions: | |
for new_mention in new_mentions: | |
print('new mention') | |
print(new_mention) | |
if new_mention.startsWith("@"): | |
mentions.append(new_mention) | |
return mentions |
NewerOlder