Skip to content

Instantly share code, notes, and snippets.

/* stylelint-disable declaration-empty-line-before */
@import '../../styles/vars';
.circleWrap {
width: 100%;
height: 100%;
transform: rotate(-90deg);
stroke-width: 6px;
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import throttle from 'lodash.throttle';
import makeClassName from 'src-utils/makeClassName';
import { ProgressTypeEnums } from './constants';
const styles = require('./Progress.css');
/* eslint-disable react/prefer-stateless-function */
//@flow
const templates = {
prefix: "",
sn: ' and %d seconds',
suffix: " ago",
seconds: "less than a minute",
minute: "about a minute",
minutes: "%d minutes",
hour: "about an hour",
import React from 'react';
import { render } from 'react-dom';
import DangerousHTML from 'react-dangerous-html';
const html = [
'<li><blockquote class="twitter-video" data-lang="en"><p lang="en" dir="ltr">One of the most incredible videos I’ve ever seen! <a href="https://twitter.com/hashtag/Sinabung?src=hash&amp;ref_src=twsrc%5Etfw">#Sinabung</a> <a href="https://twitter.com/hashtag/Sumatra?src=hash&amp;ref_src=twsrc%5Etfw">#Sumatra</a> <a href="https://twitter.com/hashtag/Indonesia?src=hash&amp;ref_src=twsrc%5Etfw">#Indonesia</a> <a href="https://t.co/TsLymrIRJw">pic.twitter.com/TsLymrIRJw</a></p>— UK Weather Live (@UKWeatherLive) <a href="https://twitter.com/UKWeatherLive/status/965485425187082240?ref_src=twsrc%5Etfw">February 19, 2018</a></blockquote><script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></li>',
'<li><blockquote class="twitter-video" data-lang="en"><p lang="en" dir="ltr">Huge errupted of Mount Sinabung. <a href="https://t.co/Ood1dGKfS2">pic.twitter.com
class App extends React.Component {
element = null;
componentDidMount() {
const scriptElements = this.element.querySelectorAll('script');
scriptElements.forEach(sEl => {
const scriptEl = document.createElement('script');
const attrs = sEl.attributes;
const App = () => {
return (
<ul>
<li><blockquote class="twitter-video" data-lang="en"><p lang="en" dir="ltr">One of the most incredible videos I’ve ever seen! <a href="https://twitter.com/hashtag/Sinabung?src=hash&amp;ref_src=twsrc%5Etfw">#Sinabung</a> <a href="https://twitter.com/hashtag/Sumatra?src=hash&amp;ref_src=twsrc%5Etfw">#Sumatra</a> <a href="https://twitter.com/hashtag/Indonesia?src=hash&amp;ref_src=twsrc%5Etfw">#Indonesia</a> <a href="https://t.co/TsLymrIRJw">pic.twitter.com/TsLymrIRJw</a></p>— UK Weather Live (@UKWeatherLive) <a href="https://twitter.com/UKWeatherLive/status/965485425187082240?ref_src=twsrc%5Etfw">February 19, 2018</a></blockquote><script async="" src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></li>
<li><blockquote class="twitter-video" data-lang="en"><p lang="en" dir="ltr">Huge errupted of Mount Sinabung. <a href="https://t.co/Ood1dGKfS2">pic.twitter.com/Ood1dGKfS2</a></p>— ..e.. (@edykbarus) <a href="https://twitter.com/edykbarus/status
class SomeComponent extends React.Component {
...
componentDidMount() {
const script = document.createElement("script");
script.type = "text/javascript";
script.src = "[path_to_some_library]";
document.getElementsByTagName("head")[0].appendChild(script);
}
...
@itrelease
itrelease / Buffer Overflow Tutorial in Kali.md
Created March 29, 2017 23:11 — forked from apolloclark/Buffer Overflow Tutorial in Kali.md
Buffer overflow demonstration in Kali Linux, based on the Computerphile video
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<script>this.Meduza = function(modules) {
function __webpack_require__(moduleId) {
if (installedModules[moduleId]) return installedModules[moduleId].exports;
var module = installedModules[moduleId] = {
exports: {},
const bigBird = {
name: 'Big Bird',
address: { name: 'Whatever' },
age:6,
comments:[
{body:'sing, sing a song',title:'Line 1'},
{body:'make it simple',title:'Line 2'},
{body:'sing out strong',title:'Line 3'}]
};