Skip to content

Instantly share code, notes, and snippets.

@Raincal
Raincal / ReactDOMRe.re
Created Apr 19, 2020
Testing React Context
View ReactDOMRe.re
[@bs.optional] [@bs.as "data-testid"]
dataTestid: string,
View keybase.md

Keybase proof

I hereby claim:

  • I am raincal on github.
  • I am raincal (https://keybase.io/raincal) on keybase.
  • I have a public key ASAk1KosbLNOcvnchci3q4b5YqUc-F5RtIz2fgMh5NA1yQo

To claim this, I am signing this object:

View keybase.md

Keybase proof

I hereby claim:

  • I am raincal on github.
  • I am raincal (https://keybase.io/raincal) on keybase.
  • I have a public key ASDleUyCJCTks176BpYYiDxcJt6g138a8Vzw1Ak1DlUFrQo

To claim this, I am signing this object:

@Raincal
Raincal / graphql.ts
Created Jul 9, 2019 — forked from mfellner/graphql.ts
Using Apollo Server in Next.js 9 with API route in pages/api/graphql.ts
View graphql.ts
import { ApolloServer, gql } from 'apollo-server-micro';
const typeDefs = gql`
type Query {
sayHello: String
}
`;
const resolvers = {
Query: {
@Raincal
Raincal / hooks.js
Created Jul 3, 2019
react-loop-2019
View hooks.js
import { useEffect, useRef, useState } from 'react';
export function useLogging(message) {
useEffect(() => {
console.log(message);
}, [message]);
}
function getLocalStorageValue(key) {
const val = localStorage.getItem(key);
View keybase.md

Keybase proof

I hereby claim:

  • I am Raincal on github.
  • I am raincal (https://keybase.io/raincal) on keybase.
  • I have a public key whose fingerprint is 7495 3D1B A936 5169 396D 4E6F BDB2 F7AC 26B1 32A3

To claim this, I am signing this object:

View rxjs_operators_by_example.md
View setup.sh
!/bin/bash
apt-get update
apt-get install privoxy -y
git clone https://github.com/Raincal/shadowsocksr.git
python2 shadowsocksr/shadowsocks/local.py -s pub.liuboping.com -p 443 -l 1090 -k www.liuboping.com -m aes-128-ctr -O auth_aes128_md5 -o tls1.2_ticket_auth --fast-open
View composer.json
{
"name": "flarum/flarum",
"description": "Delightfully simple forum software.",
"type": "project",
"keywords": [
"forum",
"discussion"
],
"homepage": "http://flarum.org",
"license": "MIT",
View mariadb
docker exec -it mariadb sh -c 'exec mysql -h "$MYSQL_PORT_3306_TCP_ADDR" -P "$MYSQL_PORT_3306_TCP_PORT" -uroot -p "$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'