Skip to content

Instantly share code, notes, and snippets.

View khanof89's full-sized avatar
🎯
Focusing

Shahrukh Khan khanof89

🎯
Focusing
View GitHub Profile
#!/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
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()
========= 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') {
import React, {Component, Fragment} from 'react';
export default class Contact extends Component {
render() {
return (
<Fragment>
Contact Us
</Fragment>
)
}
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) => (
{
"model": {
"ssd": {
"num_classes": 90,
"box_coder": {
"faster_rcnn_box_coder": {
"y_scale": 10,
"x_scale": 10,
"height_scale": 5,
"width_scale": 5
<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">
[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
@khanof89
khanof89 / Easily backup and move mysql database
Created April 16, 2019 06:48
This script will help you backup all your databases on a server and then move it to a new mysql server
==================================================================
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
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