Skip to content

Instantly share code, notes, and snippets.

@antonpenev
antonpenev / package.json
Created December 18, 2019 12:03 — forked from surma/package.json
Boilerplate for quick one-off TypeScript projects. Just run `npm start`
{
"name": "tsquickstart",
"version": "1.0.0",
"description": "Boilerplate for quick one-off TypeScript projects. Just run `npm start`",
"scripts": {
"init": "test -f tsconfig.json || (tsc --init -t ESNext -m ESNext && npm install)",
"start": "npm run init && concurrently \"npm run watch\" \"npm run serve\"",
"serve": "http-server",
"watch": "tsc -p . --watch",
"build": "tsc -p ."
@antonpenev
antonpenev / fix_media_keys_kechron_ubuntu.sh
Created July 30, 2019 14:17
Keychron K2 keyboard - Ubuntu fix media keys switch
# Keychron is used like Apple keyboard in ubuntu:
# Reference: https://help.ubuntu.com/community/AppleKeyboard
#
# 0 = disabled : Disable the 'fn' key. Pressing 'fn'+'F8' will behave like you only press 'F8'
# 1 = fkeyslast : Function keys are used as last key. Pressing 'F8' key will act as a special key. Pressing 'fn'+'F8' will behave like a F8.
# 2 = fkeysfirst : Function keys are used as first key. Pressing 'F8' key will behave like a F8. Pressing 'fn'+'F8' will act as special key (play/pause).
echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode
@antonpenev
antonpenev / Technical Indicators without TA-lib.py
Created March 7, 2018 14:08 — forked from kevincdurand1/Technical Indicators without TA-lib.py
Technical Indicators without TA-lib #tags: Technical Indicators, Quant
import numpy
import pandas as pd
import math as m
#Moving Average
def MA(df, n):
MA = pd.Series(pd.rolling_mean(df['Close'], n), name = 'MA_' + str(n))
df = df.join(MA)
return df
@antonpenev
antonpenev / Default%20%28OSX%29.sublime-keymap
Last active March 31, 2018 07:52
sublime sync settings
[
{ "keys": ["alt+\\"], "command": "valign" }
]
This file will hold all the settings of the Atom editor
Purpose: sync across different PCs with the sync-settings package