This file contains hidden or 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
function main() { | |
console.log("tick"); | |
// Find the header signifying current timeline mode | |
const title = document.querySelector( | |
'[data-testid="primaryColumn"] h2[role="heading"]' | |
); | |
// If it isn't loaded yet, try again in 0.5 secs | |
if (!title) { |
This file contains hidden or 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
# frozen_string_literal: true | |
class VideoUrlParser | |
VideoMatch = Struct.new(:type, :video_id, :matches) | |
def initialize(url) | |
@url = url | |
@match = match_url | |
@type = @match.type | |
@video_id = @match.video_id |
This file contains hidden or 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
Metrics/BlockLength: | |
Exclude: | |
- "spec/**/*_spec.rb" | |
Rails/Delegate: | |
Enabled: false | |
Rails/HasAndBelongsToMany: | |
Enabled: false |
This file contains hidden or 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
Verifying my Blockstack ID is secured with the address 17Wp7UfqKqy6JsjRF5w2yHi2jaZBMQcZt8 https://explorer.blockstack.org/address/17Wp7UfqKqy6JsjRF5w2yHi2jaZBMQcZt8 |
This file contains hidden or 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
/* globals fetch */ | |
require('isomorphic-fetch') | |
const { parse } = require('url') | |
const { send } = require('micro') | |
module.exports = async (req, res) => { | |
const { query } = parse(req.url) | |
res.setHeader('Access-Control-Allow-Origin', '*') | |
res.setHeader('Content-Type', 'application/json') |
This file contains hidden or 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 { Component } from 'react' | |
import { Provider, connect } from 'react-redux' | |
import { reducer, initStore } from './store' | |
export default function Connected (...args) { | |
return function (Comp) { | |
return class StoreComponent extends Component { | |
static getInitialProps ({ req }) { | |
const isServer = !!req | |
const store = initStore(reducer, undefined, isServer) |
This file contains hidden or 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
require 'ostruct' | |
# Make little bundles of variables using Let {} | |
# | |
# example: | |
# things = Let { | |
# self.posts = Post.all | |
# self.comments = Comment.where(post: posts) | |
# } | |
# |
This file contains hidden or 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, PropTypes } from 'react' | |
import { connect } from 'react-redux' | |
/* ACTIONS */ | |
export const ADD = 'something_clever/ADD' | |
export function add () { | |
return { type: ADD } | |
} |
This file contains hidden or 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, PropTypes } from 'react' | |
import { findDOMNode } from 'react-dom' | |
class TrixEditor extends Component { | |
static propTypes = { | |
value: PropTypes.string, | |
onChange: PropTypes.func | |
} | |
componentDidMount () { |
This file contains hidden or 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
<!DOCTYPE HTML> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | |
<title> Test display of HTML elements </title> | |
<!-- based off of https://www.cs.tut.fi/~jkorpela/www/testel.html, with additions of newer features --> | |
</head> | |
<body> | |
<header> | |
<h1>Testing display of HTML elements</h1> |