Unable to import module 'lambda_function': /var/task/array.so: undefined symbol: PyUnicodeUCS2_FromUnicode
This file contains hidden or 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
Summary: Set uid/pid/supplementary groups | |
Name: setusergroups | |
Version: 0.1.0 | |
Release: 1%{?dist} | |
License: MIT | |
Group: Applications/Utilities | |
URL: https://github.com/tokuhirom/setusergroups/ | |
Source: https://github.com/tokuhirom/setusergroups/archive/master.zip | |
BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) | |
BuildRequires: make |
This file contains hidden or 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
package main | |
import ( | |
"bufio" | |
"encoding/json" | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"regexp" |
Lock_time: 0
にマッチした行と、その次の 3 行を除外する- OSX では ggrep を使う
- 参考: http://unix.stackexchange.com/questions/226348/how-to-grep-v-and-also-exclude-the-next-line-after-the-match
$ grep -P -A 3 'Lock_time: (?!0)' slowquery.log
# Query_time: 0.017416 Lock_time: 1.000000 Rows_sent: 0 Rows_examined: 0
use test;
SET timestamp=1452839731;
commit;
This file contains hidden or 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 | |
WILDCARD="\*.example.com" | |
ROUTEFILE=/path/to/routefile | |
for domain in $(grep rrset ${ROUTEFILE} | awk '{print $2}' | sed -e 's/[",]//g' | sed -e 's/[.]$//g' | sort | uniq); do | |
if echo $domain | grep ^\* -qs ; then | |
d=$(echo $domain | sed -e 's/\*/test/') | |
curl --connect-timeout 1 curl -s --head -v https://${d}/ 2>&1 | grep -qs "Server certificate: ${WILDCARD}" | |
else |
This file contains hidden or 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
FROM centos:centos6 | |
WORKDIR /usr/local | |
RUN yum update -y && yum install -y java-1.7.0-openjdk tar | |
RUN curl -L https://s3.amazonaws.com/jruby.org/downloads/9.0.4.0/jruby-bin-9.0.4.0.tar.gz | tar zxf - | |
ENV PATH /usr/local/jruby-9.0.4.0/bin:$PATH | |
RUN gem install norikra --no-ri --no-rdoc | |
RUN gem install norikra-listener-mackerel --no-ri --no-rdoc | |
RUN gem install norikra-udf-percentile --no-ri --no-rdoc |
$ at "14:50 2015-12-28" -f /path/to/file
job 1 at 2015-12-28 14:50
$ at $(LANG=C date +"%H:%M %Y-%m-%d" -d "2015-12-28T14:51") -f /path/to/file
job 2 at 2015-12-28 14:51
This file contains hidden or 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
{ | |
"datacenter": "dc01", | |
"data_dir": "/tmp/dc01/node4", | |
"log_level": "INFO", | |
"dns_config": { | |
"allow_stale": true, | |
"node_ttl": "60s", | |
"max_stale": "60s", | |
"service_ttl": { | |
"*": "15s" |
This file contains hidden or 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
# ~/.ssh/config | |
_known_hosts_real() | |
{ | |
export NSS_SDB_USE_CACHE=yes | |
local config_file=~/.ssh/config | |
local ctime=0 | |
[ -f $config_file ] && ctime=$(stat -c %Y $config_file) | |
local t=$(($(date +%s) - $ctime)) | |
local interval=60 | |
local search_word="# mackerel" |
yum install -y pcre-devel
wget http://www.haproxy.org/download/1.6/src/haproxy-1.6.2.tar.gz
mv haproxy-1.6.2.tar.gz /path/to/rpmbuild/SOURCES/
# put /path/to/rpmbuild/SPECS/haproxy.spec
rpmbuild -ba /path/to/rpmbuild/SPECS/haproxy.spec