Skip to content

Instantly share code, notes, and snippets.

View m3talsmith's full-sized avatar

Michael Christenson II m3talsmith

View GitHub Profile
@m3talsmith
m3talsmith / pigeongolayout.txt
Created September 2, 2020 17:31
Suggested layout for pigeongo
root // package pigeongo
├── cmd // package cmd
│ │ // import (
│ │ // "flag"
│ │ // "tildegit.org/PigeonProtocolConsortium/pigeongo"
│ │ // )
│ ├── cli.go
│ ├── cli_test.go
│ └── ...

Keybase proof

I hereby claim:

  • I am m3talsmith on github.
  • I am mynameisdad (https://keybase.io/mynameisdad) on keybase.
  • I have a public key ASBguxQPtpHd17G1jiMnxbrQBVAD-RLMCEnFutZ8IBVRMgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am m3talsmith on github.
  • I am m3talsmith (https://keybase.io/m3talsmith) on keybase.
  • I have a public key ASBh5Il3UNdX1iiIiG6c3ossF4POUWPSjViqUR3IGdag0Ao

To claim this, I am signing this object:

@m3talsmith
m3talsmith / naive function array sorting test.rs
Created November 12, 2017 18:33
Attempt to sort numbers in a non-destructive fashion through a function.
fn sort_array(numbers: &[i32]) -> &[i32] {
let mut sorted_numbers = numbers.clone();
sorted_numbers.sort();
sorted_numbers
}
fn main() {
let numbers: [i32; 7] = [7,1,5,2,4,3,6];
let sorted_numbers = find_duplicates(&numbers);
println!("numbers: {:?}", numbers);
@m3talsmith
m3talsmith / elasticsearch.yml
Created October 26, 2016 02:14
Elastic search config
# ======================== Elasticsearch Configuration =========================
#
# NOTE: Elasticsearch comes with reasonable defaults for most settings.
# Before you set out to tweak and tune the configuration, make sure you
# understand what are you trying to accomplish and the consequences.
#
# The primary way of configuring a node is via this file. This template lists
# the most important settings you may want to configure for a production cluster.
#
# Please see the documentation for further information on configuration options:
@m3talsmith
m3talsmith / zer0.conf
Created October 26, 2016 02:09
Rethinkdb config for Ubuntu 16.04
#
# RethinkDB instance configuration sample
#
# - Give this file the extension .conf and put it in /etc/rethinkdb/instances.d in order to enable it.
# - See http://www.rethinkdb.com/docs/guides/startup/ for the complete documentation
# - Uncomment an option to change its value.
#
###############################
## RethinkDB configuration
@m3talsmith
m3talsmith / config_redis_6379
Last active March 14, 2020 18:34
Redis config
# Redis configuration file example.
#
# Note that in order to read the configuration file, Redis must be
# started with the file path as first argument:
#
# ./redis-server /path/to/redis.conf
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
@lookup = {}
def fn name, *arities, callback
@lookup["#{name} #{arities}"] = callback
end
def lookup_fn_by_arities name, *arities
@lookup["#{name} #{arities}"]
end
set mode-mouse on
set mouse-select-window on
set mouse-select-pane on
set mouse-resize-pane on
@m3talsmith
m3talsmith / steppinit.rb
Created January 29, 2015 14:44
a demonstration of updating a sorted item
class Step
attr_accessor :id, :position
// all_steps = [Step.new(id: 1), Step.new(id: 2), Step.new(id: 3)]
def move_to(position)
new_steps = all_steps
new_step.delete_at(new_steps.index(self))
new_steps.insert(position, self)
new_steps.each_with_index do |step, index|