start new:
tmux
start new with session name:
tmux new -s myname
/* This bookmarklet tries to find the first selected link and opens the QR code. When no link is selected the current URL is used. */ | |
javascript:(function(){%20function%20openqr(url){window.open('http://api.qrserver.com/v1/create-qr-code/?data='+encodeURIComponent(url)+'&size=700x700&qzone=6');}%20var%20selected,dl,i;%20dl%20=%20document.links;%20if%20(window.getSelection%20&&%20window.getSelection().containsNode)%20{%20/*%20mozilla%20*/%20for(i=0;%20i<dl.length;%20++i)%20{%20if%20(window.getSelection().containsNode(dl[i],%20true))%20{%20selected%20=%20true;%20openqr(dl[i].href);%20break;%20}%20}%20}%20if%20(!selected)%20{%20/*ie,%20or%20mozilla%20with%20no%20links%20selected%20*/%20openqr(document.URL);%20}%20})(); | |
/* This bookmarklet uses the current URL. On some pages the above bookmarklet doesn't work/always uses an unwanted URL. If you experience this issue or don't need selected links try this one. */ | |
javascript:(function(){window.open('http://api.qrserver.com/v1/create-qr-code/?data='+encodeURICompo |
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
Vagrant.configure("2") do |config| | |
## Begin vagrant-hostsupdater | |
## https://github.com/cogitatio/vagrant-hostsupdater | |
## vagrant plugin install vagrant-hostsupdater | |
if Vagrant.has_plugin?("vagrant-hostsupdater") && configValues['apache']['install'] == '1' | |
config.hostsupdater.remove_on_suspend = true | |
config.hostsupdater.aliases = Array.new | |
configValues['apache']['vhosts'].each do |i, host| |
[02:06 PM] acemarke: @Steven : a couple other thoughts on the whole NODE_ENV
thing. First, per my comments, it really is a Node concept. It's a system environment variable that Node exposes to your application, and apparently the Express web server library popularized using its value to determine whether to do optimizations or not
[02:08 PM] acemarke: Second, because of its use within the Node ecosystem, web-focused libraries also started using it to determine whether to they were being run in a "development" environment vs a "production" environment, with corresponding optimizations. For example, React uses that as the equivalent of a C #ifdef
to act as conditional checking for debug logging and perf tracking. If process.env.NODE_ENV
is set to "production"
, all those if
clauses will evaluate to false
.
Third, in conjunction with a tool like UglifyJS that does minification and removal of dead code blocks, a clause that is surrounded with if(process.env.NODE_ENV !== "development")
Hi,
I really like the embedded code snippets feature introduced last month,[1] but I just realized it doesn't work across repositories. Take this comment[2] as an example: currently, a snippet permalink into Linuxbrew/homebrew-core[3] is turned into an embedded snippet, but a snippet permalink into Linuxbrew/brew[4] is not. It would be really nice if cross-repo links are also converted. It would be beneficial to the Homebrew project for instance, where the package manager itself is developed in Homebrew/brew, the package definitions are developed in separate repos (what we call taps) like Homebrew/homebrew-core, and there are quite a bit of cross references between brew and taps. Thank you.
Best, Zhiming
[1] https://github.com/blog/2415-introducing-embedded-code-snippets
[2] https://github.com/Linuxbrew/homebrew-core/issues/4198#issuecomment-331113613
[3] https://github.com/Linuxbrew/homebrew-core/blob/59b343a86689531bc59702e376654821f766b1c8/Formula/glibc.rb#L16-L31