Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
cdp_params = { | |
origin: page.server_url, | |
permission: { name: 'clipboard-read' }, | |
setting: 'granted' | |
} | |
page.driver.browser.execute_cdp('Browser.setPermission', **cdp_params) | |
clip_text = page.evaluate_async_script('navigator.clipboard.readText().then(arguments[0])') |
ruby -e'_,__="",binding;loop do$><<">> "if$/>_ | |
puts"=> %p"%[__.eval(_+=gets||exit!),_=""] | |
rescue Exception | |
puts"\e[31m%p\e[0m"%[$!,_=""]if/d e|ee/!~"#$!"end' |
Since Twitter doesn't have an edit button, it's a suitable host for JavaScript modules.
Source tweet: https://twitter.com/rauchg/status/712799807073419264
const leftPad = await requireFromTwitter('712799807073419264');
Note: these are pretty rough notes I made for my team on the fly as I was reading through some pages. Some could be mildly inaccurate but hopefully not terribly so. I might resort to convenient fiction & simplification sometimes.
My top contenders, mostly based on popularity / community etc:
Mostly about MVC (or derivatives, MVP / MVVM).
How to install Ubuntu 14.04.1 LTS 64-bit on a MacBook Pro Retina 15" Mid 2014 (11,3)
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry sessionDebugger
#Error management in gulp
Sucking at something is the first step to becoming sorta good at something
No one can assure you, that plugins will run smooth in any circumstances (except for tests - they could), so neither should you convince anyone, that your plugin will never break. Only thing, that you could possibly do (if something gone wrong) - is gracefully inform your plugin user, that something went wrong and die.
We are will use this plugin from beginning to demonstrate error management. Suppose you have a task in gulpfile.js
that contains this code (we modified it a little bit to be closer to real-usage):
var coffee = require('gulp-coffee');
# In Chef, when a resource is defined all its variables are evaluated during | |
# compile time and the execution of the resource takes place in converge phase. | |
# So if the value of a particular attribute is changed in converge | |
# (and not in compile) the resource will be executed with the old value. | |
# Example problem: | |
# Let's consider this situation where there are two steps involved in a recipe | |
# Step 1 is a Ruby block that changes a node attribute. Rubyblocks get executed | |
# in converge phase | |
# Step 2 is a Chef resource that makes use of the node attribute that was |
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>HTML5 Starter Template</title> | |
<meta name="description" content="Starter Template"> | |
<meta name="author" content="Gregry Pike"> | |
<link rel="stylesheet" href="css/styles.css?v=1.0"> | |
<!--[if lt IE 9]> | |
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> |
# | |
# Install the MYSQL driver | |
# gem install mysql2 | |
# | |
# Ensure the MySQL gem is defined in your Gemfile | |
# gem 'mysql2' | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: |