This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AsyncMethodJob < ApplicationJob | |
queue_as :default | |
def perform(target:, method_name:, args:, queue_name: :default) | |
self.class.queue_as(queue_name) | |
# `target` could be either an instance or a class | |
target = target.constantize if target.is_a?(String) # Convert class name to class object if needed | |
target.send(method_name, *args) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule Rauversion.AutoContext do | |
defmacro __using__(opts) do | |
quote bind_quoted: [opts: opts] do | |
import Ecto.Query, warn: false | |
alias Rauversion.Repo | |
def list do | |
Repo.all(unquote(opts)) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%= turbo_frame_tag "conversation-list-#{@app.key}" do %> | |
<%= render partial: 'conversation', collection: @conversations, locals: {app: @app} %> | |
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* You can use inline styles or classNames inside your callbacks | |
*/ | |
import React, {Component} from 'react' | |
import redraft from 'redraft' | |
var Prism = require('prismjs'); | |
//Prism.highlightAll(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Aren't gists great! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'json' | |
require 'em-hiredis' | |
require 'faye/websocket' | |
require 'rack' | |
Faye::EventSource.class_eval do | |
attr_accessor :connected_at | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule UploaderHandler do | |
use Application | |
# See http://elixir-lang.org/docs/stable/elixir/Application.html | |
# for more information on OTP Applications | |
def start(_type, _args) do | |
# import Supervisor.Spec | |
IO.puts "iniciando" | |
children = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Concerns | |
module KindBehavior | |
extend ActiveSupport::Concern | |
included do |base| | |
#base.extend( Concerns::KindBehavior::ModelClassMethods ) | |
# usage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In file included from test.c:2: | |
./cimgui.h:26:12: error: unknown type name 'ImGuiIO' | |
CIMGUI_API ImGuiIO* igGetIO(); | |
^ | |
./cimgui.h:27:12: error: unknown type name 'ImGuiStyle' | |
CIMGUI_API ImGuiStyle* igGetStyle(); | |
^ | |
./cimgui.h:28:12: error: unknown type name 'ImDrawData' | |
CIMGUI_API ImDrawData* igGetDrawData(); | |
^ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## start here: | |
- https://github.com/notro/rpi-source/wiki | |
## then here: | |
https://www.raspberrypi.org/forums/viewtopic.php?f=29&t=99688 | |
and |
NewerOlder