A (more) complete cheatsheet for Arel, including NamedFunction functions, raw SQL and window functions.
posts = Arel::Table.new(:posts)
posts = Post.arel_table # ActiveRecord
# official docs: https://graphql-ruby.org/dataloader/sources.html | |
# app/graphql/sources/association.rb | |
class Sources::Association < ::GraphQL::Dataloader::Source | |
def initialize(association_name, scope = nil) | |
@association_name = association_name | |
@scope = scope | |
end | |
def fetch(records) |
inkscape=/Applications/Inkscape.app/Contents/MacOS/inkscape | |
insvg=burpicon.svg | |
output=burp | |
outdir=${output}.iconset | |
mkdir $outdir | |
for sz in 16 32 128 256 512 | |
do | |
echo "[+] Generete ${sz}x${sz} png..." | |
$inkscape --without-gui --export-file ${outdir}/icon_${sz}x${sz}.png -w $sz -h $sz $insvg |
After fresh install of League of Legends on macOS with case-sensitive APFS volume it's not possible to start League of Legends game, after champion selection the launcher won't open the game client and is stuck with reconnect button.
Terminal method is probably more reliable as you can see real file names within terminal opposite to Finder which "beautifies" them so you can't be sure what the actual file name is.
Note that League patcher will probably install updates under old filename so it's possible that these steps will need to be taken after every patch until Riot fixes it.
Terminal.app
from Applicationscd /Applications/League of Legends.app/Contents/LoL/RADS/solutions/lol_game_client_sln/releases/
version: '3' | |
services: | |
neon-wallet-db: | |
container_name: "neon-wallet-db" | |
image: slipoh/neon-wallet-db:latest | |
environment: | |
- MONGOURL=mongodb:27017 | |
- MONGOPASS=neo | |
- MONGOUSER=gas | |
- MONGOAPP=test |
If you're like me and wanted to serve your main app script from a CDN and still load a web worker, you may have encountered the following error:
Uncaught DOMException: Failed to construct 'Worker': Script at 'http://cdn.example.com/worker.js' cannot be accessed from origin 'http://example.com'
You can get around this fairly simply with importScripts by making the script you instantiate your worker with load the actual worker script from the CDN.
// in preload scripts, we have access to node.js and electron APIs | |
// the remote web app will not have access, so this is safe | |
const { ipcRenderer: ipc, remote } = require('electron'); | |
init(); | |
function init() { | |
// Expose a bridging API to by setting an global on `window`. | |
// We'll add methods to it here first, and when the remote web app loads, | |
// it'll add some additional methods as well. |
module BatchJobStateful | |
extend ActiveSupport::Concern | |
included do | |
field :current_batch_id, type: String | |
field :last_batch_total, type: Integer | |
field :last_batch_failures, type: Integer | |
field :last_batch_created_at, type: Time | |
field :last_batch_completed_at, type: Time | |
end |
{ | |
"presets": ["es2015"], | |
"plugins": ["transform-async-to-generator"] | |
} |
gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'
Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component
(and thus, prerendering).
Note that jquery-rails
can be removed from Gemfile, the npm version of jquery
and jquery-ujs
will be used instead.