Skip to content

Instantly share code, notes, and snippets.

View init.el
;; Not sure both are necessary
(use-package flycheck-mypy
:ensure t
:config
(add-hook 'python-mode-hook (lambda ()
(add-to-list 'flycheck-checkers 'python-mypy))))
(use-package flycheck
:init (global-flycheck-mode)
:config
(add-hook 'python-mode-hook
View emacs-lsp-python.el
(use-package lsp-mode
:custom
;; (lsp-auto-guess-root nil)
(lsp-prefer-flymake nil)
(lsp-ui-doc-position 'bottom)
:hook ((python-mode . lsp))
:commands lsp)
(use-package lsp-ui
:config
View cctx_ohlc_fetch.py
# Python
import asyncio
import ccxt.async_support as ccxt
from datetime import datetime, timedelta
async def print_bitfinex_ethbtc_ticker():
bitfinex = ccxt.bitfinex()
# print(await bitfinex.fetch_ticker('ETH/BTC'))
View hc-webos.el
;;; Package --- Summary
;;; Commentary:
;;; Code:
(require 'find-dired)
(defun webos-top (path &optional strict)
"Return wtop from PATH.
@inlinechan
inlinechan / market.go
Last active Nov 29, 2018
get data from upbit API
View market.go
package main
// Get ticker from upbit and collect high volume and acc price
import (
"encoding/json"
"fmt"
"net/http"
"sort"
"strings"
@inlinechan
inlinechan / candlestick.dem
Created Nov 17, 2017
candlestick from btcusd 4h
View candlestick.dem
set title "BTCUSD 4H" at screen 0.5, screen 0.95 center
# set yrange [75:105]
# set ytics (105, 100, 95, 90, 85, 80)
# set xrange [50:253]
set lmargin 9
set rmargin 2
set grid
set boxwidth 0.2
set style fill solid
set style arrow 1 head filled ls 1
View test_custom_time_unmarshal.go
// UnmarshalJSON from string to time.Time
package main
import (
"encoding/json"
"fmt"
"time"
)
type Response struct {
@inlinechan
inlinechan / test_json_unmarshal.go
Created Oct 19, 2017
UnmarshalJSON from []float64 to struct(Value)
View test_json_unmarshal.go
// UnmarshalJSON from []float64 to struct(Value)
package main
import (
"encoding/json"
"fmt"
)
type Value struct {
First float64
View save_mms.sh
#!/bin/bash
# for crontab
export PATH=$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
URL=mms://211.181.136.136/livefm
DESTDIR=$HOME/Music/chulsoo
RECIPIENT='foo@bar.com'
WAVFILE=$(date +\%Y\%m\%d\%H).wav
DURATION=3600
@inlinechan
inlinechan / init.el
Created Mar 10, 2017
init.el use-package
View init.el
;;; init.el --- My own emacs configuration
;; Copyright (C) 2017 Hyungchan Kim
;; Author: Hyungchan Kim <inlinechan@gmail.com>
;; Keywords: lisp use-package
;;; Commentary:
;; `use-package'
You can’t perform that action at this time.