A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$
if your browser aliases it:
~ 108 byte version
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
/* | |
* An implementation of Ruby's string.succ method. | |
* By Devon Govett | |
* | |
* Returns the successor to str. The successor is calculated by incrementing characters starting | |
* from the rightmost alphanumeric (or the rightmost character if there are no alphanumerics) in the | |
* string. Incrementing a digit always results in another digit, and incrementing a letter results in | |
* another letter of the same case. | |
* | |
* If the increment generates a carry, the character to the left of it is incremented. This |
<% flashes = {notice: 'success', alert: 'standard', error: 'alert', secondary: 'info'} %> | |
<% flashes.each do |key, value| %> | |
<% if flash[key] %> | |
<%= content_tag :div, :data => { :alert => '' }, :class => "alert-box #{value} radius" do %> | |
<%= flash[key] %> | |
<%= link_to '×'.html_safe, '#', :class => 'close'%> | |
<% end %> | |
<% end %> | |
<% end %> |
#!/usr/bin/env ruby --disable-gems | |
# Tab completion for minitest tests. | |
# | |
# INSTALLATION: | |
# | |
# 1. Put this file in a directory in your $PATH. Make sure it's executable | |
# 2. Run this: | |
# | |
# $ complete -o bashdefault -f -C /path/to/this/file.rb ruby |
extension_id=jifpbeccnghkjeaalbbjmodiffmgedin # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc"
unzip -d "$extension_id-source" "$extension_id.zip"
Thx to crxviewer for the magic download URL.
files: | |
# If this file is edited, it must be removed from EC2 instance prior to deploy. | |
"/opt/elasticbeanstalk/hooks/appdeploy/pre/09_yarn_install.sh" : | |
mode: "000775" | |
owner: root | |
group: users | |
content: | | |
#!/usr/bin/env bash | |
set -xe |
This assumes you have brew installed and are comfortable using a terminal.
Following the guide on https://github.com/tpruvot/cpuminer-multi will likely lead to errors about invalid paths to OpenSSL, and neoscrypt errors to the tune of Undefined symbols for architecture x86_64
during the build. I managed to piece together different fixes into an installation that has worked for me. So I hope it works for you.
Ensure a c compiler is installed. Type g++
in the terminal and continue with the xcode installation if necessary. If it prints clang: error: no input files
, then you can proceed.
// http://www.ruanyifeng.com/blog/clipboard/ | |
var as = $('.module-list').querySelectorAll('a') | |
as = [].slice.call(as) | |
as = as.map(el => el.href) | |
var obj = {} | |
as.reduce((promise, item) => { | |
return promise.then(() => { | |
return fetch(item).then(res => res.text()).then(res => { |