Skip to content

Instantly share code, notes, and snippets.

View alloy's full-sized avatar

Eloy Durán alloy

View GitHub Profile
require "./src/sidekiq"
`redis-cli flushdb`
class LoadWorker
include Sidekiq::Worker
perform_types Int64
def perform(idx)
end
@HiImJulien
HiImJulien / Swift Meets CCxx.md
Last active March 30, 2024 19:00
This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.

Swift Meets C/C++

This gist is a simple example on how to call a function written in swift from C/C++, without taking the detour via Objective-C/C++.


Analytics

In this example we're going to invoke a function called say_hello, which, as the name already suggests, prints "Hello, World!" to the terminal.

@korchasa
korchasa / oss.md
Last active December 15, 2021 10:24
OSS homekit (without homebridge)
@dnkoutso
dnkoutso / local_dependencies_source.rb
Created March 20, 2020 17:48
A CocoaPods source that discovers podspecs locally.
module Pod
class LocalDependenciesSource < Source
attr_reader :sandbox
attr_reader :local_podspecs_by_name
def self.register(plugin_name, sandbox, local_podspec_dependencies)
return unless local_podspec_dependencies
# Register a source that can be used to provide local podspecs
HooksManager.register(plugin_name, :source_provider) do |context|
@sibelius
sibelius / richTextToRelayRecordProxy.tsx
Created September 17, 2020 22:01
Transform an object to a Relay Record Proxy
export const richTextToRelayRecordProxy = (bodyRichText, store) => {
const bodyRichTextId = 'client:RichText:' + tempID++;
const bodyRichTextRecord = store.create(bodyRichTextId, 'RichText');
bodyRichTextRecord.setValue(bodyRichText.text, 'text');
bodyRichTextRecord.setValue(bodyRichText.html, 'html');
const { contentState } = bodyRichText;
if (contentState) {
const contentStateId = 'client:DraftContentState:' + tempID++;