Skip to content

Instantly share code, notes, and snippets.

View Metnew's full-sized avatar

Vladimir Metnew Metnew

View GitHub Profile
@Metnew
Metnew / GoogleHackMasterList.txt
Created July 4, 2016 13:45 — forked from cmartinbaughman/GoogleHackMasterList.txt
The definitive super list for "Google Hacking".
admin account info" filetype:log
!Host=*.* intext:enc_UserPassword=* ext:pcf
"# -FrontPage-" ext:pwd inurl:(service | authors | administrators | users) "# -FrontPage-" inurl:service.pwd
"AutoCreate=TRUE password=*"
"http://*:*@www” domainname
"index of/" "ws_ftp.ini" "parent directory"
"liveice configuration file" ext:cfg -site:sourceforge.net
"parent directory" +proftpdpasswd
Duclassified" -site:duware.com "DUware All Rights reserved"
duclassmate" -site:duware.com
@Metnew
Metnew / SCSS ESSENTIAL MEDIA QUERIES.scss
Created July 11, 2016 15:01
SCSS ESSENTIAL MEDIA QUERIES
@mixin respond-to($media) {
@if $media == mobile{
@media only screen and (max-width: $break-small) {
@content;
}
}
@else if $media == tablet {
@media only screen and (min-width: $break-small + 1) and (max-width: $break-large - 1){
@content;
}
@Metnew
Metnew / route protected by authentication react-router 4
Created April 15, 2017 15:58
route protected by authentication react-router 4
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {Route, Redirect} from 'react-router'
/**
* Component that protects route from unauthorized users.
* @type {Object}
*/
class RouteAuth extends Component {
constructor(props) {
/**
* Returns application routing with protected by AuthCheck func routes
* @param {Function} authCheck checks is user logged in
*/
export const Routing = authCheck => {
// remove components that aren't application routes, (e.g. github link in sidebar)
let routes = appRouting.filter(a => a.tag || a.component)
// render components that are inside Switch (main view)
let routesRendered = routes.map((a, i) => {
// get tag for Route. is it RouteAuth `protected route` or Route?
export const appRouting = [
{
path: '/',
exact: true,
tag: RouteAuth,
component: Dashboard
},
{
path: '/inbox',
exact: true,
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {Provider} from 'react-redux'
import {ConnectedRouter as Router} from 'react-router-redux'
export default class Root extends Component {
static propTypes = {
store: PropTypes.object,
history: PropTypes.object,
routes: PropTypes.func
import React, {Component} from 'react'
import PropTypes from 'prop-types'
import {Route, Redirect} from 'react-router'
/**
* Component that protects route from unauthorized users.
* @type {Object}
*/
class RouteAuth extends Component {
static propTypes = {
// Styles
import ‘semantic-ui-css/semantic.css’
// Fetch and promise polyfill
import ‘promise-polyfill’
import ‘isomorphic-fetch’
// Application
import React from ‘react’
import ReactDOM, {render} from ‘react-dom’
import {configureApp, configureRootComponent} from ‘common/app’
// get initial redux state from server
@Metnew
Metnew / Component_vs_PureComponent_vs_stateless_component.js
Created January 13, 2018 04:17
Component vs PureComponent vs “stateless component”
if (componentHasNoState) {
return itsStatelessComponent()
} else if (componentHasSimplePropsState && propsHasNoNestedObjects) {
return itsPureComponent()
} else {
return itsComponent()
}
interface State {
 entities: object;
 fetchStatus: ‘none’ | ‘loading’ | ‘loaded’;
 errors: object;
}