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
<h1>Useful bookmarklets</h1> | |
<ul> | |
<li><a href="javascript:(function() { const urls = ['http://localhost:3000', 'https://produktion.com']; const defaultURL = urls[0];const currentOrigin = window.location.origin;const currentIndex = urls.indexOf(currentOrigin);const nextURL = currentIndex === -1 ? defaultURL : urls[(currentIndex + 1) % urls.length];window.open(window.location.href.replace(currentOrigin, nextURL));})()">Open the current URL but in a different environments</a></li> | |
<li><a href="javascript:(function() { const selector=prompt('Selector','.');const all=document.querySelectorAll(selector);console.log(all),[...all].map((e=>e.classList.add('debug-outline')));var newScript=document.createElement('style'),content=document.createTextNode('.debug-outline { outline: 1px solid #f0f; }');newScript.appendChild(content);var bodyClass=document.getElementsByTagName('head')[0];bodyClass.insertBefore(newScript,bodyClass.childNodes[2]),window.speechSynthesis.speak(new SpeechSynthesisUtterance(`${all.length} found` |
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
# Gemfile | |
group :development, :test do | |
gem 'rspec-rails' | |
gem "capybara" | |
gem "selenium-webdriver" | |
end |
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
require 'io/console' | |
height, width = $stdout.winsize | |
clear_screen = "\e[1;1H\e[2J" | |
bg_colour = "\e[40m" | |
tree_colour = "\e[42m" | |
base_height = 3 | |
# Go into raw mode so users can enter 1 character at a time | |
$stdin.raw! |