Skip to content

Instantly share code, notes, and snippets.

View daqo's full-sized avatar
🐝
I'm a busy bee and I may be slow to respond.

David Qorashi daqo

🐝
I'm a busy bee and I may be slow to respond.
  • Facebook
  • San Fransico, CA
View GitHub Profile
@daqo
daqo / pulldotfiles.sh
Last active October 29, 2017 16:43
A script to restore dotfiles from a remote repository
git clone --bare https://github.com/daqo/dotfiles.git $HOME/.cfg
function config {
git --git-dir=$HOME/.cfg/ --work-tree=$HOME $@
}
mkdir -p .config-backup
config checkout --force
# if [ $? = 0 ]; then
# echo "Checked out config.";
# else
# echo "Backing up pre-existing dot files.";
@daqo
daqo / going-declaration-todo.md
Last active December 1, 2017 22:03
Implementation details for Going/NotGoing Declation (Backend Perspective)
  1. Under user_type, we need to create a new acceptedOrganizations connection. This will return all the orgs that the current user is accepted into (based on funnel_state).

  2. Under user_type, we need to create a new connection named pendingAcceptedOrganizations. This will return all the orgs that a user has uos.pending_accepted field set for.

  3. The client is responsible for merging the result of #1 and #2. (Client's responsibility)

  4. For each item in the accepted organization listing, we rely on amAccepted field under organization_type. If it resolves to true, we show Set Going button. If it's false, we don't show that button and instead, the mobile client checks for amPendingAccepted field under organization_type. If that value is set, the mobile client shows "Pending Verification" badge.

  5. To upload the acceptance letter the mobile client needs to use FilePicker's client library to directly do the upload, and then it will supply the returned photo url to `UpdateUserOrganizationPendingA

Discoverable Group Channels (Backend Work):

Custom Attributes

  • Each discoverable group channel will carry the following custom attributes:
topic: string
org_uuid: string
description: string
locked: string
@daqo
daqo / blockchain.md
Last active October 6, 2021 20:27
Blockchain Essentials for Developers

Blockchain Course

These are the notes that I have taken on “IBM blockchain Essentials for Developers” course on Coursera IBM Blockchain Foundation for Developers | Coursera.

Jargon

Ledger: the system of record for a business

Transaction: an asset transfer onto or off the ledger

@daqo
daqo / note.md
Last active May 29, 2018 22:31
Low-level analytics breakdown for new chat functionality

Low-level analytics breakdown

Following events are suggested to be gathered from various parts of our system.

Allowed channel types:

  • 1-1
  • bulk
  • announcement
@daqo
daqo / roommate_matching.md
Created June 12, 2018 22:52
Roommate Matching Implementation

Roommate Matching Implementation

We could implement our current roommate matching functionality in three different ways with the release of the new app.

Elixir Bot

To make this work, we need to adjust our current RoomBot code to talk to Ejabberd server instead of Twilio.

Current Implementation

@daqo
daqo / feed-subscription.jsx
Last active August 3, 2018 01:46
A sample React component that uses subscriptions along with Relay Modern
fragment Feed_item on Photo {
id
creator {
id
name
}
photoUrl
}
class Feed extends React.Component {
@daqo
daqo / git.sh
Created October 13, 2019 04:45
Git cheatsheet
#!/bin/bash
##########
# contents
##########
# contents
# notes
# script setup
# git config files