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
| use caps::{self, CapSet, Capability, CapsHashSet}; | |
| use daemonize::Daemonize; | |
| use std::{ | |
| fmt::Write, | |
| sync::{Arc, Condvar, Mutex}, | |
| thread, | |
| time::Duration, | |
| }; | |
| struct Sensor { |
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 com.github.luben.zstd; | |
| import java.io.InputStream; | |
| import java.io.OutputStream; | |
| import java.io.ByteArrayInputStream; | |
| import java.io.IOException; | |
| import java.io.FileOutputStream; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.nio.charset.Charset; |
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
| local wezterm = require 'wezterm'; | |
| return { | |
| default_prog = {"/usr/bin/zsh", "-l"}, | |
| font = wezterm.font_with_fallback({"Iosevka Term SS09 Light"},{foreground="#b0b0b0"}), | |
| font_size = 12.0, | |
| dpi = 96.0, | |
| font_dirs = {"/usr/share/fonts/iosevka-term"}, | |
| font_rules = { | |
| { | |
| italic = true, |
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
| #[derive(Clone)] | |
| struct Repeat { | |
| current: u32, | |
| end: u32, | |
| } | |
| impl Repeat { | |
| fn new(current: u32, end: u32) -> Self { | |
| Repeat {current, 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
| import com.typesafe.config._ | |
| import akka.actor._ | |
| import scala.util.Random | |
| sealed trait Msg; | |
| case object Ping extends Msg; | |
| case object Pong extends Msg; | |
| case object Leak extends Msg; | |
| class ServerActor extends Actor { |
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
| use std::slice::Iter; | |
| use std::ops::{Add, Mul, Neg}; | |
| use std::borrow::Cow; | |
| use std::fmt::Debug; | |
| use std::rc::Rc; | |
| /// Our string type is copy-on-write string refs | |
| type Str<'a> = Cow<'a, str>; | |
| /// Marker trait for the values |
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
| CREATE OR REPLACE FUNCTION set_foo(foo_val varchar) RETURNS void AS $$ | |
| BEGIN | |
| EXECUTE format('SET SESSION my.foo TO %I', foo_val) ; | |
| END; | |
| $$ LANGUAGE plpgsql; | |
| CREATE OR REPLACE FUNCTION get_foo() RETURNS varchar AS $$ | |
| DECLARE | |
| foo_val varchar; | |
| BEGIN |