This file contains 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
var intervalTime = 2000 | |
var intervalFunc = setInterval(()=> { | |
const btns = btn = document.getElementsByClassName("Bgi($g-ds-background-like):a") | |
const likeBtn = btns[0] | |
likeBtn.click() | |
}, intervalTime) |
This file contains 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
"scripts":{ | |
"test:debug": "node --inspect-brk ./node_modules/jest/bin/jest.js --runInBand --watch", | |
} |
This file contains 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 { useContext } from "react" | |
export function useContextFactory<T>(name: string, context: React.Context<T>) { | |
return () => { | |
const ctx = useContext(context) | |
if (ctx === undefined) { | |
throw new Error( | |
`use${name}Context must be used withing a ${name}ContextProvider.` | |
) | |
} |
This file contains 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
alter table(:qa_job) do | |
add :body, :jsonb | |
add :input, :jsonb | |
add :output, :jsonb | |
end |
This file contains 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
/* | |
* NOTE: this file will upload wha is set inside `.runtimeconfig.json` | |
* to firebase functions. | |
* | |
* To run go to root in the project and run: | |
* cat .runtimeconfig.json | node ./parser.js | |
*/ | |
const stdin = process.openStdin() | |
const spawn = require('child_process').spawn |
This file contains 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
{ | |
"editorconfig": true, | |
"trailingComma": "es5", | |
"semi": false, | |
"singleQuote": true, | |
"jsxBracketSameLine": false, | |
"arrowParens": "always", | |
"printWidth": 80 | |
} |
This file contains 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
/* | |
* in package.json set the next script: | |
* "update-refs": "node update-refs.js ENVIRONTMENT_A && node update-refs.js ENVIRONTMENT_B && ... && node update-refs.js ENVIRONTMENT_i && git add ." | |
*/ | |
const fs = require('fs') | |
const axios = require('axios') | |
const saveRef = (envFile, ref) => { | |
const envDev = fs.readFileSync(envFile, { | |
encoding: 'utf8', |
This file contains 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 isFlattenable(value) { | |
return Array.isArray(value) | |
} | |
function flattenImplementation (array, depth = Infinity, isStrict, result = []) { | |
let index = -1 | |
let length = array.length | |
while (++index < length) { | |
var value = array[index] |
This file contains 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, { useState } from 'react' | |
import get from 'ts-get' | |
import { useTheme } from 'emotion-theming' | |
import styled from '~/theme/types' | |
import Navbar from '~/components/organisms/Header' | |
import Footer from '~/components/organisms/Footer' | |
interface BlogPageProps { | |
location: { |
NewerOlder