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
[Unit] | |
Description=AvalancheGo | |
Wants=network-online.target | |
After=network.target network-online.target | |
[Service] | |
User=ubuntu | |
Group=ubuntu | |
WorkingDirectory=/home/ubuntu/go/src/github.com/ava-labs/avalanchego | |
ExecStart=/home/ubuntu/go/src/github.com/ava-labs/avalanchego/build/avalanchego |
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
struct Ticker | |
getter tick, done | |
@tick = Channel(Bool).new | |
@done = Channel(Bool).new | |
def initialize(tick_s : Int32) | |
spawn do | |
loop do | |
sleep tick_s | |
@tick.send true |
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
struct Ticker | |
getter tick | |
@tick = Channel(Bool).new | |
def initialize(tick_s : Int32) | |
spawn do | |
loop do | |
sleep tick_s | |
@tick.send true | |
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
#!/bin/sh | |
# | |
# Faktory build on Ubuntu 16.04 | |
# | |
# Christian Kakesa <[email protected]> | |
# 2017-11-23 | |
set -eu | |
BASEDIR=${HOME}/src/faktory |
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
# frozen_string_literal: true | |
require 'erubi' | |
require 'shield' | |
class ErubiDeck < Syro::Deck | |
include Shield::Helpers | |
LAYOUT = 'layout' | |
VIEW = 'views/%s.erb' | |
DEFAULT_OPTIONS = { |
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 'logger' | |
require 'net/ssh' | |
require 'stud/interval' | |
@log = Logger.new(STDOUT).tap { STDOUT.sync = true } | |
@ssh_session = Net::SSH.start('localhost', 'christian', password: 'xxx') | |
@interruptible = false | |
trap('SIGINT') { @interruptible = true } |
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
// Singleton threadsafe sample | |
// by Christian Kakesa <[email protected]> | |
// (c) 2011 | |
#include "exemple.h" | |
int Exemple::get_number() const | |
{ | |
return number_; | |
} |
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
//... | |
#if defined(WINXX) | |
#include <sys/timeb.h> | |
typedef struct timeval { | |
__time64_t tv_sec; | |
long tv_usec; | |
} timeval; | |
#else | |
#include <sys/time.h> | |
#endif //defined(WINXX) |