h
move cursor to the leftj
move downk
move upl
move righti
Go into Insert mode-
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Find.find('vendor/extensions/shop').each {|f| puts ("html2haml, #{f}, #{f.slice(0...-3)+"haml"}") if f =~ /.*\.erb/} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Simple turn it off | |
ActiveSupport::Deprecation.silenced = true | |
# Or add custom handler | |
# ActiveSupport::Deprecation.behavior = Proc.new { |msg, stack| MyLogger.warn(msg) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# === EDITOR === | |
Pry.editor = 'vim' | |
# == Pry-Nav - Using pry as a debugger == | |
Pry.commands.alias_command 'c', 'continue' rescue nil | |
Pry.commands.alias_command 's', 'step' rescue nil | |
Pry.commands.alias_command 'n', 'next' rescue nil | |
Pry.commands.alias_command 'r!', 'reload!' rescue nil | |
Pry.config.color = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
study(title="Parabolic SAR", shorttitle="P-SAR", overlay=true) | |
start = input(2, minval=0, maxval=10, title="Start - Default = 2 - Multiplied by .01") | |
increment = input(2, minval=0, maxval=10, title="Step Setting (Sensitivity) - Default = 2 - Multiplied by .01" ) | |
maximum = input(2, minval=1, maxval=10, title="Maximum Step (Sensitivity) - Default = 2 - Multiplied by .10") | |
sus = input(true, "Show Up Trending Parabolic Sar") | |
sds = input(true, "Show Down Trending Parabolic Sar") | |
disc = input(false, title="Start and Step settings are *.01 so 2 = .02 etc, Maximum Step is *.10 so 2 = .2") | |
//"------Step Setting Definition------" | |
//"A higher step moves SAR closer to the price action, which makes a reversal more likely." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name TradingView editor options | |
// @namespace https://www.tradingview.com/ | |
// @version 1.0 | |
// @author bespokoid | |
// @match https://www.tradingview.com/* | |
// ==/UserScript== | |
(function() { | |
document.addEventListener("load", event => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python concurrecy sandbox, inspired by Ned Batchelder's (@nedbat) articles on Python concurrency and raising the progressbar (links below) | |
# Exec workfn() for every tuple generated by argsfn() in concurrent fashion. By default spans 1M tasks using different mechanics, draw progressbar and time execution | |
# Current example trying to calculate mean of the Beast, to do so we collect fractions of 666, pow them and calculate average | |
# If you want less satanic example, just implement workfn and argsfn functions to your liking. | |
# I haven't much time for this yet, was merely currious with Ned Batchelder code from his articles "Doing a pile of work" and "Do a pile of work better" | |
# Turned out Ned's solution caries some overhead, but my code also left much to be desired. In other words there is no danger of sudden bugs or ideas shortage | |
# Original articles by Ned Batchelder | |
# https://nedbatchelder.com/blog/202008/do_a_pile_of_work.html |
This is merely a gist of great speech made by Raymond Hettinger @raymondh at PyCon 2013 Original video can be enjoyed here and original slides can be found there
Almost all code snippets are presenting two or three ways of doing things: bad, ugly and pythonic :) I changed code a bit to make it Python3 compatible and added some notes regarding Python2/3 transition