A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord| ! Hybrid Terminal Colours. Uses the palette from Tomorrow-Night: | |
| ! https://github.com/chriskempson/tomorrow-theme/blob/master/vim/colors/Tomorrow-Night.vim | |
| ! vim: ft=xdefaults | |
| *background: #1D1F21 | |
| *foreground: #C5C8C6 | |
| ! black | |
| *color0: #282A2E | |
| *color8: #373B41 | |
| ! red |
| #!/bin/bash -x | |
| # https://developer.apple.com/library/archive/technotes/tn2450/_index.html | |
| # https://qiita.com/hetima/items/b475997008dabd567da0 | |
| target=`hidutil list |grep 'Apple Internal Keyboard' |head -n 1 |awk 'BEGIN{printf "\{%s","\"VendorID\":"} {printf "%s",$1} {printf "%s",","} {printf "%s","\"ProductID\":"} END{printf "%s\}\n",$2}'` | |
| # 0x700000000 | |
| # LeftControl=0xE0 | |
| LeftControl=0x7000000E0 |
https://docs.swift.org/swift-book/LanguageGuide/Properties.html
| xcode: | 11 |
|---|---|
| target/platform: | iOS 13.1 |
| swift: | 5 |
| warning: | 'defer' statement before end of scope always executes immediately; replace with 'do' statement to silence this warning |
| fix-suggest: | Replace 'defer' with 'do' |
func doSomething(value: Int?, value2: Int?) {
guard let value = value else { return }eventfd is passing counting value.
eventfd_write(fd, 1);
-> read result: 1
eventfd_write(fd, 1);
eventfd_write(fd, 1);
-> read result: 2