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
for i in `curl -XGET http://localhost:9200/_cat/indices | awk '{print $3}'`; do echo "curl -XPUT 'localhost:9200/$i/_settings' -d '{\"index\":{\"number_of_replicas\":1}}'"; 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
--- | |
148: | |
- 4 | |
- :nf_f_conn_id | |
8: | |
- 4 | |
- :nf_f_src_addr_ipv4 | |
7: | |
- 2 | |
- :nf_f_src_port |
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
#!/usr/bin/env python | |
# | |
import telnetlib | |
import sys | |
max_wait = 2 | |
prompt = "=>" | |
tn = telnetlib.Telnet("192.168.1.254","23") | |
tn.read_until("Username : ", max_wait) |
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
# Please make this file available to others | |
# by sending it to <lirc@bartelmus.de> | |
# | |
# this config file was automatically generated | |
# using lirc-0.9.0-pre1(default) on Sun Jan 11 20:58:28 2015 | |
# | |
# contributed by | |
# | |
# brand: /home/pi/lircd.conf | |
# model no. of remote control: |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'grok-pure' | |
require 'pp' | |
grok = Grok.new | |
grok.add_patterns_from_file("grok-patterns") | |
pattern = 'your_grok_pattern' |
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
SELECT CONCAT('ALTER TABLE `',table_schema,'`.`',table_name,'` engine=InnoDB;') FROM information_schema.tables WHERE TABLE_SCHEMA='<MY_DATABASE>' AND ENGINE = 'MyISAM'; |
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
/* Restrict users viewing their own attachments */ | |
add_filter('pre_get_posts', 'restrict_media'); | |
function restrict_media($arg) { | |
global $user_ID; | |
if ( current_user_can('editor') ) { // Disable this to apply on all roles | |
if ($arg->query['post_type'] == 'attachment' && is_admin()) { | |
$arg->query['author'] = $user_ID; | |
$arg->query_vars['author'] = $user_ID; | |
} | |
} |
NewerOlder