This file contains hidden or 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
[package] | |
name = "app" | |
version = "0.1.0" | |
description = "A Tauri App" | |
authors = ["you"] | |
license = "" | |
repository = "" | |
default-run = "app" | |
edition = "2021" | |
rust-version = "1.60" |
This file contains hidden or 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
--- | |
- set_fact: | |
redis_version: 4.0.6 | |
redis_sha256: 769b5d69ec237c3e0481a262ff5306ce30db9b5c8ceb14d1023491ca7be5f6fa | |
- get_url: | |
url: http://download.redis.io/releases/redis-{{redis_version}}.tar.gz | |
dest: /usr/local/src/ | |
sha256sum: "{{redis_sha256}}" | |
register: get_redis_result |
This file contains hidden or 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
# Q sample by Jeff Cogswell | |
#=========== | |
# We want to call these three functions in sequence, one after the other: | |
# | |
# First we want to call one, which initiates an ajax call. Once that ajax call | |
# is complete, we want to call two. Once two's ajax call is complete, we want to call three. | |
# | |
# BUT, we don't want to just call our three functions in sequence, as this quick | |
# demo will show. Look at this sample function and think about what order |
This file contains hidden or 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
#!/bin/sh | |
set -e | |
# Example init script, this can be used with nginx, too, | |
# since nginx and unicorn accept the same signals | |
# Feel free to change any of the following variables for your app: | |
TIMEOUT=${TIMEOUT-60} | |
APP_ROOT=/path/to/your/app/current | |
PID=$APP_ROOT/tmp/pids/unicorn.pid | |
ENVIRONMENT=production |
This file contains hidden or 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
# | |
# Usage: | |
# translate :title, :link, { :fallback => true, :locales => [:en, :sv, :fi] } | |
# | |
module ActiveRecordTranslate | |
def self.method_definition(column_name, options) | |
fallback_method = "nil" | |
if options[:fallback] && options[:locales].try(:size) > 1 | |
locales = options[:locales].map {|l| %Q{:"#{l}"} }.join(',') |
This file contains hidden or 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 ActiveRecordTranslate | |
def self.included(base) | |
base.send :include, InstanceMethods | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def translated_column_name(name) | |
:"#{name}_#{I18n.locale}" | |
end |
This file contains hidden or 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 Taggable | |
def self.included(base) | |
base.send :include, InstanceMethods | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
def initialize(collection_names) | |
delimiter = ',' |