Demo using dynamic attributeBindings to enable auto-attribute bindings without having to know all possible combinations.
Note this is using a simplified version of {{one-way-input}} (part of the ember-one-way-controls addon).
Demo using dynamic attributeBindings to enable auto-attribute bindings without having to know all possible combinations.
Note this is using a simplified version of {{one-way-input}} (part of the ember-one-way-controls addon).
| #![feature(mpsc_select, box_syntax)] | |
| use std::io; | |
| use std::process::Command; | |
| use std::sync::mpsc::{channel, Receiver, Select}; | |
| use std::string::FromUtf8Error; | |
| use std::thread::spawn; | |
| #[derive(Debug)] | |
| enum PipeError { |
| require 'rails_helper' | |
| RSpec.describe TodosController, :type => :controller do | |
| describe "GET #index" do | |
| #describe "POST #create" do | |
| #describe "GET #show" do | |
| #describe "PATCH #update" do (or PUT #update) | |
| #describe "DELETE #destroy" do | |
| #describe "GET #new" do |
| # Merging Scopes | |
| # ============== | |
| # The goal is to join two tables to get all the records where a scope on both | |
| # side of the join is used. I used to do this with a `where()` in which I | |
| # added some sql on the joined table. But, I wanted to use the existing scopes | |
| # from the joining table. Turns out there's a `merge` method on a scope where | |
| # you can merge with another scope without having to chain! | |
| class Car < ActiveRecord::Base | |
| has_and_belongs_to_many :people |
Thanks to this article by Christoph Berg
Directories and files
~/| let g:ctrlp_buffer_func = { 'enter': 'CtrlPMappings' } | |
| function! CtrlPMappings() | |
| nnoremap <buffer> <silent> <C-@> :call <sid>DeleteBuffer()<cr> | |
| endfunction | |
| function! s:DeleteBuffer() | |
| let path = fnamemodify(getline('.')[2:], ':p') | |
| let bufn = matchstr(path, '\v\d+\ze\*No Name') | |
| exec "bd" bufn ==# "" ? path : bufn |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
#Prerequisites#
npm install passportnpm install passport-localpackage.json)#Steps#
Initially asked at RORO but I will elaborate with an example.
What we need to do is the following:
| // if we have | |
| function do() { | |
| // thing that takes 100ms - 2s depending on browser | |
| } | |
| // Instead of: | |
| setInterval(do, 500) // pray it doesn't lock the browser | |
| // Do this: |