Skip to content

Instantly share code, notes, and snippets.

// 1. Trend (e.g. moving average crossover)
function run()
{
vars Price = series(price());
vars Trend = series(LowPass(Price,500));
vars MMI_Raw = series(MMI(Price,300));
vars MMI_Smooth = series(LowPass(MMI_Raw,500));
if(falling(MMI_Smooth)) {
@54chi
54chi / Interactive Resume.markdown
Last active April 5, 2016 13:11
Interactive Resume
@54chi
54chi / Cloud9.md
Last active January 30, 2017 09:03
Quicksheet for Vagrant/Postgres/Elixir/Phoenix for my repos

#PHOENIX IN CLOUD9

##Every now and then "maintenance":

Depending on how acitve you are, your Cloud 9 virtual instance may go to sleep from time to time. When this happens, couple things will go down with it too. Fret not, here is how to put them all back again:

  1. Reinitialize the environment(system) variables. In the console, make sure you are in the folder that holds your ".env" file and type: source .env. You can then check your system variables with the following console command: printenv
  2. You may also need to restart the DB service (if you installed on the same instance). For Postgresql, type the following in the console to do so: sudo service postgresql start

To sum up:

GTFS Example in One Piece

Introduction

GTFS (General Transit Feed Specification) defines a common format for public transportation schedules and associated geographic information. It’s super useful for travel websites and trip planners.

We’ll use Neo4j to showcase how quickly and easily this standard can be implemented in a solution.

@54chi
54chi / SecurityAndPrivacy.md
Last active August 26, 2016 08:19
Dayscore (Shiny Happy People)

Dayscore (Shiny Happy People) - Data Security and Privacy Statement

We store your dayscore in a mongo database on our mlabs server. Connection to our database instance from our server is secured using an stunnel as outlined here.

Account removal and data retention

If you wish to close an account with us, simply uninstall your add-on from your room and we'll remove all associated data. During the beta period, please also contact the author at [email protected]

Privacy

The data collected during the use of this add-on will not be shared with third parties except as required by law.

@54chi
54chi / northwind.markdown
Created December 10, 2016 01:13 — forked from nicolewhite/northwind.markdown
MySQL to Neo4j

From SQL to Neo4j: Northwind

SQL Model

Neo4j Model

Get the SQL Dump

The SQL dump was stolen from here and imported into MySQL.

original source

Elixir is a modern functional language built on top of the Erlang VM. It's fully compatible with Erlang, but features a more standard syntax and many more features.

# Single line comments start with a number symbol.
@54chi
54chi / Making it work for Mac OS.md
Last active July 15, 2021 20:06
LG UltraWide settings

How to create a 1280x1080 (among others) scaled resolutions for your non-standard monitor

Ultrawide monitors with PBP (Picture by Picture) are becoming more common these days. It allows you to split the screen and connect multiple sources to your monitor (e.g. 2 computers at the same time)

The problem is that the resolution is typically not supported out of the box (E.g. a 2560x1080 monitor, when split into 2 will require a 1280x1080 resolution, which is not standard in Mac OS as of Sierra)

Creating custom resolutions

First, we have to reboot in rootless mode, and disable the Integrity Protection, so we can create/override the screen file settings:

@54chi
54chi / sfdxUpdate.md
Created January 13, 2022 23:21
SFDX stuff

How to Update SFDX in Windows Bash (WSL) if getting a "403: Invalid Channel Stable" error.

NOTE: This is only valid if you already have successfully installed SFDX at least once in WSL, and want to update it.

It looks like I'm the only one that continues to regularly get this Error: HTTP 403: Invalid channel stable everytime I run sfdx update. I don't want to reinstall every single time, so the compromise that seems to work is to download the zip again and untar it:

1. wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable/sfdx-linux-x64.tar.xz , or
1. wget https://developer.salesforce.com/media/salesforce-cli/sfdx/channels/stable-rc/sfdx-linux-x64.tar.xz , if you want the RELEASE CANDIDATE