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
=== REDIS BUG REPORT START: Cut & paste starting from here === | |
[23745] 31 Jan 01:46:44.911 # Redis 2.8.4 crashed by signal: 11 | |
[23745] 31 Jan 01:46:44.912 # Failed assertion: <no assertion failed> (<no file>:0) | |
[23745] 31 Jan 01:46:44.912 # --- STACK TRACE | |
/usr/local/bin/redis-server *:26379(logStackTrace+0x43)[0x445c93] | |
/usr/local/bin/redis-server *:26379(sentinelGetMasterByNameOrReplyError+0x17)[0x44e697] | |
/lib64/libpthread.so.0(+0xf710)[0x7ff7b9fba710] | |
/usr/local/bin/redis-server *:26379(sentinelGetMasterByNameOrReplyError+0x17)[0x44e697] | |
/usr/local/bin/redis-server *:26379(sentinelCommand+0x115)[0x4521a5] | |
/usr/local/bin/redis-server *:26379(call+0x70)[0x41b240] |
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
// in a script file - we can attach a listener to a form ... this code handles the case that the form is for creating and editing a record. the code below detects whether the UA supports pushState and rather than redirecting to get the new window state, it can do this client side and use pushState to set the URL correctly.. | |
if (updateOnNew && typeof(window.history.pushState) == 'function') { | |
window.history.pushState("", "Edit Schedule", schedule.update_url + "/edit"); | |
// update any local page state... | |
} else if (updateOnNew) { | |
window.location = schedule.update_url + "/edit"; // older browser must redirect on new update | |
} |
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
Unexpected exception in Dalli: ArgumentError: wrong number of arguments (1 for 2) | |
[ee0b343a3f5d9800f2ff8089b00be93a] [99.238.97.25] This is a bug in Dalli, please enter an issue in Github if it does not already exist. | |
[ee0b343a3f5d9800f2ff8089b00be93a] [99.238.97.25] /var/www/apps/this_is_an_app/shared/bundle/ruby/2.0.0/gems/dalli-2.7.0/lib/dalli/server.rb:299:in `delete' | |
/var/www/apps/this_is_an_app/shared/bundle/ruby/2.0.0/gems/dalli-2.7.0/lib/dalli/server.rb:60:in `request' | |
/var/www/apps/this_is_an_app/shared/bundle/ruby/2.0.0/gems/dalli-2.7.0/lib/dalli/options.rb:18:in `block in request' | |
/usr/local/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize' | |
/var/www/apps/this_is_an_app/shared/bundle/ruby/2.0.0/gems/dalli-2.7.0/lib/dalli/options.rb:17:in `request' | |
/var/www/apps/this_is_an_app/releases/20140212215756/app/controllers/application_controller.rb:344:in `block in expire_calltracking_file' | |
/var/www/apps/this_is_an_app/releases/20140212215756/app/controllers/application_controller.rb:344:in `each' | |
/var/www |
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/bash | |
# | |
# Add Named Security Group and Default to the given IP Address | |
# security-group-updates.sh ipaddress | |
# | |
NAME_TO_ADD='the security group name' # name of the security group to add | |
ADD_SECURITY='xxxxxxx-xxxx-...' # ID of the security group to add | |
DEFAULT_SECURITY='xxxxxxx-xxxx-...' # ID of the default security group you want to keep | |
# check if the give hostip has a security group and needs to be updated |
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
// insert code here: https://calltrackingmetrics.com/accounts/tracking_script_settings | |
window.CTMSourceEvent = function(event) { | |
if(event.state=='after') { | |
// generic solution to replace a number format for a given element after our code runs e.g. after event. | |
document.getElementById("the-phone").innerHTML = "Insert Your Custom Number Format"; | |
} | |
if (event.state == 'node:after') { | |
// more fine grained control of replacement you have access to the exact DOM Element we've located a number and replaced. |
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
curl -XGET 'http://10.241.0.241:9200/calls/call/_count?pretty=1' -d '{ | |
"query": { | |
"term": { "account_id": 25 } | |
} | |
}' |
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
{ | |
"cluster_name" : "elasticsearch", | |
"status" : "red", | |
"timed_out" : false, | |
"number_of_nodes" : 1, | |
"number_of_data_nodes" : 1, | |
"active_primary_shards" : 14, | |
"active_shards" : 14, | |
"relocating_shards" : 0, | |
"initializing_shards" : 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
check process newrelic-mysql | |
with pidfile "/var/run/newrelicmysql.pid" | |
start program = "/etc/init.d/newrelic-mysql start" | |
stop program = "/etc/init.d/newrelic-mysql stop" | |
if 2 restarts within 3 cycles then timeout | |
if totalmem > 100 Mb then alert | |
if cpu usage > 95% for 3 cycles then restart | |
if 5 restarts within 5 cycles then timeout |
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
# query.count # rails 4.1 -> select count(distinct(texts.id), texts.*) from texts | |
# query.count # rails 4.0 -> select count(distinct(texts.id)) from texts |
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
window.CTMSourceEvent = function(event) { | |
if (event.state != "before") { return } | |
// console.log(event.rule[2]); | |
// your code ga here: ga.send("event", ... ) | |
} |
OlderNewer