Skip to content

Instantly share code, notes, and snippets.

Avatar
🤔
Trying to remember if I backpropagated that Go error

Marcin Wojnarowski shilangyu

🤔
Trying to remember if I backpropagated that Go error
View GitHub Profile
@shilangyu
shilangyu / index.ts
Last active Jul 24, 2019
Strongly typed Mobx-React `inject` that separates injects from props
View index.ts
import { inject, IStoresToProps } from 'mobx-react'
import { Component } from 'react'
import UserStore from './UserStore' // import your stores
import AuthStore from './AuthStore' // import your stores
export const user = new UserStore()
export const auth = new AuthStore()
export interface IStores {
user: UserStore,
@shilangyu
shilangyu / YTthumbnail.js
Created Apr 30, 2019
Get youtube thumbnail
View YTthumbnail.js
javascript: (() => { window.open(`http://img.youtube.com/vi/${ytplayer.config.args.video_id}/hqdefault.jpg`); })();
@shilangyu
shilangyu / brainly.js
Last active Apr 30, 2019
Unlock brain.ly answers (bookmarklet)
View brainly.js
javascript: (() => {document.querySelector('#answers > div > div.brn-kodiak-answer.js-kodiak-answer.js-answer.brn-kodiak-answer--locked > div.brn-kodiak-answer__content > div.js-access-to-answers__with-access.js-first-question.js-hidden').classList.remove("js-hidden");document.querySelector('#answers > div > div.brn-kodiak-answer.js-kodiak-answer.js-answer.brn-kodiak-answer--locked > div.brn-kodiak-answer__unlock.js-scroll-to-unlock-section').remove();document.querySelector('#answers > div > div.brn-kodiak-answer.js-kodiak-answer.js-answer.brn-kodiak-answer--locked > div.brn-kodiak-answer__preview-end').remove();document.querySelector('#answers > div > div.brn-kodiak-answer.js-kodiak-answer.js-answer.brn-kodiak-answer--locked > div.brn-kodiak-answer__content > div.js-access-to-answers__preview-start.brn-kodiak-answer__content--cut').remove();})()
@shilangyu
shilangyu / file-lister.js
Created Sep 22, 2018
Creates a json file listing all files and dirs from the caller dir (node.js)
View file-lister.js
const [path, fs] = ['path', 'fs'].map(require)
// config
const config = {
outputFile: {
name: 'files.json',
dir: './',
indent: 2
You can’t perform that action at this time.