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
{ config, ... }: | |
let | |
immichHost = "immich.example.com"; # TODO: put your immich domain name here | |
immichRoot = "/tank/immich"; # TODO: Tweak these to your desired storage locations | |
immichPhotos = "${immichRoot}/photos"; | |
immichAppdataRoot = "${immichRoot}/appdata"; | |
immichVersion = "release"; | |
immichExternalVolume1 = "/tank/BackupData/Google Photos/someone@example.com"; # TODO: if external volumes are desired |
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
#[derive(PartialEq, Eq, Debug, Clone, Insertable)] | |
#[table_name="orders"] | |
pub struct NewOrder { | |
pub id: i32, | |
pub account_id: Option<i32>, | |
pub side: Side, | |
pub instrument_id: i32, | |
pub price: u32, | |
pub num_shares: u32, | |
pub stamp: DateTime<UTC>, |
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
<IfModule mod_ssl.c> | |
<VirtualHost _default_:443> | |
ServerName sub.domain.com | |
ServerAlias sub.domain.com | |
# Next line puts ownCloud at the domain root instead of a /cloud/ subdirectory (e.g. example.com vs. example.com/owncloud/) | |
Alias /cloud "/var/www/cloud/" | |
DocumentRoot /var/www/cloud |
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
(ns clojure-noob.core | |
(:gen-class)) | |
;; This function works as expected | |
;; (macroexpand '(infix (1 + 1))) => (+ 1 1) | |
(defmacro infix | |
[infixed] | |
(let [[arg1 binop arg2] infixed] | |
(list binop arg1 arg2))) |
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
import Network.HTTP.Conduit | |
import qualified Data.ByteString as B | |
import qualified Data.ByteString.Lazy as L | |
import qualified Data.ByteString.UTF8 as BU | |
import qualified Data.ByteString.Lazy.UTF8 as LU | |
import qualified Data.Text as T | |
import Data.Conduit | |
import qualified Data.Conduit.List as CL | |
import qualified Data.Conduit.Binary as CB | |
import System.IO |
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
#[feature(globs)] | |
fn private() { | |
println("I am private"); | |
} | |
mod test { | |
use super::*; | |
#[test] |
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
fn main() | |
// get list of paths | |
assert!(paths.len() > 0); | |
let mut in_common = 0; | |
while paths.iter().all(|path|{ | |
path.components().nth(in_common).map_default(false |comp| { | |
paths[0].components().nth(in_common).map_default(false, |ref_comp| { |
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
Root crate span = 0:10192 | |
Root crate Location: ../rustfind/rustfind.rs | |
Mod Location: ../rustfind/rustfind.rs | |
Mod span = 837:855 | |
Mod name: rf_common | |
Mod Location: ../rustfind/rustfind.rs | |
Mod span = 856:878 | |
Mod name: find_ast_node | |
Mod Location: ../rustfind/rustfind.rs | |
Mod span = 879:903 |
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
macro_rules! kill( | |
($thing:expr) => ( | |
::macros::destroy($thing); | |
) | |
) | |
#[inline] | |
pub fn destroy<T>(_: T) { | |
} |
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
macro_rules! expect( | |
($expr:expr, $value:expr) => ( $expr ) | |
) | |
macro_rules! likely( | |
($expr:expr) => ( expect!($expr != false, true)) | |
) | |
macro_rules! unlikely( | |
($expr:expr) => ( expect!($expr != false, false)) |
NewerOlder