Skip to content

Instantly share code, notes, and snippets.

View kevinkassimo's full-sized avatar
🤕
Tried to be less stupid, but failed

Kevin (Kun) "Kassimo" Qian kevinkassimo

🤕
Tried to be less stupid, but failed
View GitHub Profile
@kevinkassimo
kevinkassimo / robinhood_to_simplywallst.py
Created July 5, 2021 23:02
Export Robinhood records to CSV format that can be imported to simplywall.st
# Deps: pandas, grequests
# READ ME BEFORE START!
# Please install: pandas, grequests
# pip3 install pandas grequests
#
# Usage:
# python3 robinhood_to_simplywallst.py [source_json] [optional_custom_ticker_file]
#
# <source_json>: JSON file of your historical transactions downloaded from https://api.robinhood.com/orders/
use deno_core::*;
use futures::executor::block_on;
use std::option::Option;
use futures::future::FutureExt;
use futures::future;
fn main() {
let future = async_main();
block_on(future);
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kevinkassimo
kevinkassimo / My_Year_With_Deno.md
Last active November 3, 2020 21:30
MY one year with Deno

MY Year With Deno...

... and my internal struggles.

WARNING: This is a NON-technical article. Stop reading if you are here hoping to find anything useful about design of Deno.

WARNING 2: If you are an experienced software engineer, you might find this article very boring.

const { provider, consumer } = createDecorator();
@provider('red')
class App extends React.Component {
render() {
return <Button />;
}
}
@consumer('color')
const ColorContext = React.createContext();
class App extends React.Component {
constructor(props) {
super(props);
this.updateColor = (newColor) => this.setState({ color: newColor })
this.state = {
color: 'red',
const createDecorator = () => {
const {
Provider: RawProvider,
Consumer: RawConsumer,
} = React.createContext(null);
const provider = (value) => (WrappedClass) => {
return class extends React.Component {
constructor(props) {
super(props);
@kevinkassimo
kevinkassimo / rd
Last active April 9, 2018 20:39
RD (regular directory), Fancier cd
#!/bin/bash
### Change current directory and cache it
# e.g.
# $ rd some/dir
# (after a while)
# $ rd # jump to some/dir
function rd {
if [[ ! -z "$1" ]]; then
cd "$1"
@kevinkassimo
kevinkassimo / p5_twitter_test.sh
Last active March 5, 2018 00:54
Testing twitter.edges results for Project 5
#!/bin/bash
rm -rf ./output
echo "====== Testing part B results..."
echo "====== Running scala-shell..."
spark-shell -i topUsers.scala
echo "====== Validating results..."
@kevinkassimo
kevinkassimo / sc-trick
Last active January 2, 2018 18:57
Get rid of warning
#!/bin/bash
# part of the script is introduced with inspiration from https://gist.github.com/tylergets/e4ab5bea35ddcd6c3134503b44284165
echo "Temporarily starting SafeConnect process..."
sudo launchctl enable system/scManagerD 2>&1 > /dev/null
sudo launchctl load /Library/LaunchDaemons/Safe.Connect.plist 2>&1 > /dev/null
sudo launchctl enable system/scClient 2>&1 > /dev/null
sudo launchctl load /Library/LaunchAgents/Safe.Connect.client.plist 2>&1 > /dev/null
cd /Applications/SafeConnect.app/Contents/MacOS/