Skip to content

Instantly share code, notes, and snippets.

@jkintscher
jkintscher / tradingview
Created December 14, 2017 03:52
Log-space Ichimoku Indicator
// Just saved for posterity and as a backup. All credit goes to @fskrypt.
// Use right in Tradingview via https://www.tradingview.com/script/Vj0K8w14-Log-space-Ichimoku-Cloud/
//
//@version=3
study(title="Log Ichimoku Cloud", shorttitle="Log Ichimoku", overlay=true)
xlowest(src, len) =>
x = src
for i = 1 to len - 1
v = src[i]
  1. How old are you going to be?
  2. What is your favorite color?
  3. How tall are you?
  4. What is your favorite food?
  5. Who are some of your best friends?
  6. What is your favorite TV show?
  7. What is your favorite thing to do?
  8. What is the best part of your day?
  9. Where would you like to go for vacation?
  10. What do you want to do when you grow up?
// XPath CheatSheet
// To test XPath in your Chrome Debugger: $x('/html/body')
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/
// 0. XPath Examples.
// More: http://xpath.alephzarro.com/content/cheatsheet.html
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class

Keybase proof

I hereby claim:

  • I am jkintscher on github.
  • I am jkintscher (https://keybase.io/jkintscher) on keybase.
  • I have a public key whose fingerprint is 31E7 A9A6 5F2F EF9F 6DFE 04E2 7038 C1D4 3318 3ABD

To claim this, I am signing this object:

@jkintscher
jkintscher / spec.md
Last active August 29, 2015 14:11
Forecast Fixture Revamp

Automatically Cultivate Atomic Fixtures

The main idea is to have a Rake/NPM task that, for each specified endpoint, finds the index.json fixture and creates the individual, id-based fixtures as well as filtered response fixtures under the /filtered/ directory. The filters are on pre-defined properties (like FK, start/end dates, etc. See below for details).

All files created by the task(s) are from now on ignored in .gitignore.

Adding and updating fixtures will only require changes to index.json, no more copy/paste, no long diffs of the same changes in PRs, no more discrepancies stemming from wrong/missed updates. By extension, this will make code review easier and thus may also easier catch issues with udpates only being performed on one—but not all dependant—fixtures (like changing a date across all fixtures that include a project).

As part of the test setup for both, FS and FC, the rake task is run after initializing and updating the FF submodule to cultivate all atomic and filtered fixtures b

@jkintscher
jkintscher / amadeus-reporting-ui-component-spec.md
Last active August 29, 2015 14:11
Reporting UI Component Spec

Questions

  • Can the same dimension (type) be used as a row and column dimension at the same time?

Key Concepts

  • A dimension is always passed around as its JSON representation.
@jkintscher
jkintscher / index.html
Created December 3, 2013 04:02
Ember-Model FixtureAdapter
<!DOCTYPE html>
<html>
<head>
<title>Fixture Adapter</title>
<script src="http://code.jquery.com/jquery-2.0.3.js"></script>
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.1.2.js"></script>
<script src="http://builds.emberjs.com/tags/v1.2.0/ember.js"></script>
<script src="http://builds.erikbryn.com/ember-model/ember-model-c45f01c08f2a951c2c2dee07122ea5420bf4e17a.js"></script>
</head>

EmberFest

  • Ember Data
  • Ember.RSVP.all
  • DS.Model.eachRelationship(.kind)

Recap

  • First EmberFest and first-ever Ember conference in Europe, took place in Munich
  • Around 80 attendees from 12 countries and 3 different continents (!)
require 'json'
json = File.read('package.json')
dependencies = JSON.parse(json)
cmd = ''
dependencies['devDependencies'].each do |dependency|
version = dependency[1].gsub(/[\~]/, '')
cmd += 'npm install ' + dependency[0] + '@' + version + "\n"
@jkintscher
jkintscher / add-vhost.sh
Last active February 2, 2021 12:04
Apache Virtual Host Setup on OSX
#!/bin/bash
vhost=$1
NO_COLOR=$'\033[0;39m'
YELLOW=$'\033[1;33m'
while [ -z "$vhost" ]; do
read -p "Name of new vHost in $YELLOW$PWD$NO_COLOR: " vhost
done