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
[baba@feba4c963426 ~]$ cd ~/rpmbuild/SOURCES/sudo-1.8.6p3/plugins/sudoers/po | |
[baba@feba4c963426 po]$ grep -ri -A4 'plugins/sudoers/sudoers.c:448' . | grep po-msgstr | |
./ja.po-msgstr "sudo を実行するには tty がなければいけません。すみません" | |
./hr.po-msgstr "žao mi je, morate imati terminal za pokretanje sudo" | |
./zh_CN.po-msgstr "抱歉,您必须拥有一个终端来执行 sudo" | |
./fi.po-msgstr "sudo-komennon suorittamiseksi on oltava tty" | |
./it.po-msgstr "è necessario disporre di un tty per eseguire sudo" | |
./vi.po-msgstr "rất tiếc, bạn phải có tty mới có thể chạy sudo" | |
./pl.po-msgstr "niestety do uruchomienia sudo konieczny jest tty" | |
./uk.po-msgstr "вибачте, для виконання sudo вашому користувачеві потрібен tty" |
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 | |
RUN yum -y update | |
RUN yum -y groupinstall core | |
RUN yum -y groupinstall base | |
RUN echo 'p@ssw0rd' | passwd --stdin root | |
RUN service sshd start | |
RUN service sshd stop | |
RUN touch /etc/sysconfig/network | |
RUN rm -f /etc/localtime ; ln -s /usr/share/zoneinfo/Asia/Tokyo /etc/localtime | |
RUN yum -y install gcc-c++ |
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
jq 'with_entries(.key |= "KEY_" + .) | .KEY_140228' |
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 | |
declare -A hs | |
hs['key01']='val01' | |
hs['key02']='val02' | |
hs['key03']='val03' | |
hs['key04']='val04' | |
for key in ${!hs[@]} |
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
select T_NOW.CONN / T_MAX.CONN * 100 as CONN_USAGE | |
from | |
( select 1 as k, VARIABLE_VALUE as CONN from information_schema.GLOBAL_STATUS where VARIABLE_NAME = 'Threads_connected' ) as T_NOW | |
join | |
(select 1 as k, VARIABLE_VALUE as CONN from information_schema.GLOBAL_VARIABLES where VARIABLE_NAME = 'max_connections' ) as T_MAX | |
on T_NOW.k = T_MAX.k |
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
echo "SWAP used, PID, cmdline"; (ls /proc/[0-9]*/smaps | while read line; do PID=$(echo $line | cut -d / -f 3) ; SWAP=$(cat $line 2>/dev/null| grep -i swap | awk 'BEGIN{sum=0}{sum+=$2}END{print sum}') ; if [ $SWAP -ne 0 ] ; then echo "$SWAP kB, $PID", `cat /proc/$PID/cmdline` ; fi ; done ) | sort -nr -k1 | head |
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 | |
# ref: http://ssig33.com/text/VAIO%20Pro%20%E3%82%92%20Linux%20%E3%81%A7 | |
# USB の自動サスペンド | |
for F in `ls /sys/bus/usb/devices/usb[0-9]*/power/autosuspend` | |
do | |
sudo sh -c "echo 1 > ${F:?}" | |
done | |
# WiFi の省電力設定 |
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
## Usage: brew bundle | |
update | |
upgrade | |
install ag | |
install ec2-api-tools | |
install git | |
install go | |
install macvim |
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
XAUTHORITY=$HOME/.Xauthority sudo -E /usr/bin/virt-manager |