Skip to content

Instantly share code, notes, and snippets.

View charlesdarkwind's full-sized avatar

Jasmin Parent charlesdarkwind

  • Montreal, Canada
View GitHub Profile
@charlesdarkwind
charlesdarkwind / Ichimoku.js
Last active January 23, 2023 05:53
Ichimoku cloud Javascript node
const inputs = { tenkan: -9, kijun: -26, senkou: -52, chikou: -26 };
main['ichimoku_' + pair] = generateIchimoku(pair, false);
main['chikou_' + pair] = generateIchimoku(pair, true);
const generateIchimoku = (pair, isChikou) => {
const high = isChikou ? main.high[pair].slice(0, inputs.chikou) : main.high[pair];
const low = isChikou ? main.low[pair].slice(0, inputs.chikou) : main.low[pair];
@fisadev
fisadev / work
Created December 3, 2015 14:57
A python script to launch my tmux things at once
#!/usr/bin/env python
# coding: utf-8
from os import system
PROJECT_PATH = 'path_to_your_project'
ACTIVATE_VENV = '. path_to_your_virtualenv/bin/activate'
def tmux(command):
@paulirish
paulirish / bling.js
Last active November 4, 2024 17:48
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
};
NodeList.prototype.__proto__ = Array.prototype;
@marchawkins
marchawkins / get-weather-by-address.html
Last active July 29, 2021 02:28
Using the OpenWeatherMap and Google's geolocation APIs to get the current weather for the user-specified location. The user inputs a location, which is geocoded using Google Maps API. Uses the OpenWeatherMap API ((http://openweathermap.org/)) to get the data. Data is returned in JSON format. Most major browsers supported, including IE9, Chrome, …
<div class="row">
<div class="col-md-2 col-sm-2 col-xs-2">
<p><button class="btn btn-primary btn-sm" id="get-weather-btn"><span>Get Weather</span></button></p>
</div><!-- .col -->
<div class="col-md-10 col-sm-10 col-xs-10">
<div class="panel panel-default">
<div class="panel-heading">Weather &amp; Location Response</div>
<div class="panel-body">
<p>Enter Address: <input id="address" type="text" class="form-control"/></p>
<p>Lat/Long: <input id="location-lat-long" type="text" class="form-control"/></p>