Skip to content

Instantly share code, notes, and snippets.

View wyqydsyq's full-sized avatar
🌏
Breaking the Internet

wyqydsyq wyqydsyq

🌏
Breaking the Internet
  • Brisbane, Australia
View GitHub Profile
@wyqydsyq
wyqydsyq / users.ts
Created July 30, 2017 23:48
Standalone Waterline Koa Handler
import * as R from 'ramda'
const update = (context, query = {}, data = {}) => new Promise((res, rej) => {
context._waterline
.collections
.users
.update(query, data)
.exec((error, result) => {
if (error) {
return rej(error)
@wyqydsyq
wyqydsyq / config.fish
Created July 4, 2018 01:07
config.fish
set -x TERM xterm-256color
set -gx PATH ~/.local/bin/ $PATH
set -gx VISUAL code --wait
set -gx EDITOR $VISUAL
set -U fish_prompt_pwd_dir_length 0
@wyqydsyq
wyqydsyq / README.md
Created February 20, 2020 01:12
React updateStatePair

updateStatePair

Ever got tired of repeating this pattern everywhere when you want to update just one key/value pair in your state? Noticed the key/values you set in setState aren't typechecked and wish you had type safety when doing this kind of thing?

setState(prevState => ({ ...prevState, [key]: value })
// `key` and `value` can be anything here, does not have to match the type of your State

updateStatePair to the rescue!

--------------------------------------------
Hyprland Crash Report
--------------------------------------------
"stable"
Hyprland received signal 11(SEGV)
Version: 0000000000000000000000000000000000000000
Tag: 0.43.0
Date: Thu Jan 01 00:00:00 1970
Flags: