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
module mixpanel-importer | |
go 1.15 | |
require ( | |
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 | |
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c | |
) |
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
module mixpanel-importer | |
go 1.15 | |
require ( | |
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c | |
google.golang.org/api v0.46.0 | |
) |
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
module Potluck | |
module EventCollapser | |
extend self | |
def for_display(unsorted_events) | |
latest_events = merge_sort(unsorted_events, :limit => Event::MAX_EVENTS) | |
collapse(latest_events) | |
end | |
def merge_sort(unsorted_events, 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
{ | |
/* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
* | |
* This is a pretty good set, especially considering that many emacs bindings | |
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
* perhaps a few more, are already built into the system. | |
* | |
* BEWARE: | |
* This file uses the Option key as a meta key. This has the side-effect | |
* of overriding Mac OS keybindings for the option key, which generally |
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
module UserMods | |
module Tutorials | |
TUTORIALS = { | |
# define the flows, and an array of symbols for the steps of each flow here | |
:intro_flow => [ | |
:welcome, | |
:buy_pet, | |
:pet_chore | |
] |
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
while true; do total_before=$(wc -l /var/log/haproxy.log | cut -f1 -d' '); sleep 5; total_after=$(wc -l /var/log/haproxy.log | cut -f1 -d' '); echo $(((total_after-total_before)/5)) lps; done |
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
state_machine :initial => :unmonitored do | |
state :unmonitored, :up, :down | |
event :tick do | |
transition :unmonitored => :unmonitored | |
transition [:up, :down] => :up, :if => :process_running? | |
transition [:up, :down] => :down, :unless => :process_running? | |
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
ThreadError (return can't jump across threads): | |
/app/controllers/application.rb:10 | |
/vendor/plugins/identity_map/lib/identity_map.rb:90:in `call' | |
/vendor/plugins/identity_map/lib/identity_map.rb:90:in `check_static_refresh' | |
/vendor/plugins/identity_map/lib/identity_map.rb:75:in `with_identity_map' | |
/vendor/plugins/identity_map/init.rb:7:in `evaluate_init_rb' | |
/vendor/rails/activesupport/lib/active_support/callbacks.rb:177:in `call' | |
/vendor/rails/activesupport/lib/active_support/callbacks.rb:177:in `evaluate_method' | |
/vendor/rails/actionpack/lib/action_controller/filters.rb:393:in `call' | |
/vendor/rails/actionpack/lib/action_controller/filters.rb:598:in `run_before_filters' |
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
CommentBox.prototype = { | |
refresh: function() { | |
var textarea = this.text; | |
if (textarea.val().trim() == "" && !this.hasFocus) { | |
textarea.addClass("empty").val("write something..."); | |
} else if (textarea.val().trim() == "write something...") { | |
textarea.val("").removeClass("empty"); | |
}; | |
}, | |
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
{ | |
/* Keybindings for emacs emulation. Compiled by Jacob Rus. | |
* | |
* This is a pretty good set, especially considering that many emacs bindings | |
* such as C-o, C-a, C-e, C-k, C-y, C-v, C-f, C-b, C-p, C-n, C-t, and | |
* perhaps a few more, are already built into the system. | |
* | |
* BEWARE: | |
* This file uses the Option key as a meta key. This has the side-effect | |
* of overriding Mac OS keybindings for the option key, which generally |
NewerOlder