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
Windows Registry Editor Version 5.00 | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate] | |
"ElevateNonAdmins"=dword:00000001 | |
"WUServer"="http://192.168.8.53:8530" | |
"WUStatusServer"="http://192.168.8.53:8530" | |
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate\AU] | |
"NoAutoUpdate"=dword:00000000 | |
"AUOptions"=dword:00000003 |
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
# The MIT License (MIT) | |
# Copyright © 2023 Faizal Sadri | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
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 | |
# My system IP/set ip address of server | |
PUBLIC_PORT=(22 80) | |
# comment this to disable | |
ENABLE_PRIVATE=1 | |
## | |
# $PRIVATE_PORT must have the same array lenght | |
# with PRIVATE_IP |
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 | |
CMD="$(dirname $0)/$(basename $0)" | |
if [ $# -ne 2 ]; then | |
echo "${CMD} <ip> <port>" | |
else | |
echo > /dev/tcp/$1/$2 && echo "open" | |
fi | |
#echo > /dev/tcp/192.168.1.41/9100 && echo "open" |
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 | |
VG_GROUP=geekha | |
LV_NAME=www1-disk | |
DATE="$(date +%Y_%m_%d-%H%M)" | |
LV_TAG=snapshot | |
SIZE=20G | |
# retention copy | |
COPY=3 | |
lvcreate -L$SIZE -s -n $LV_NAME-$LV_TAG-$DATE /dev/$VG_GROUP/$LV_NAME |
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
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
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 | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2016 Faizal Sadri | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is |
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
; create file in /var/named/example.com | |
; example.com | |
$TTL 3600 | |
example.com. IN SOA ns1.example.com. [email protected]. ( | |
2021062601 ; Serial | |
3H ; refresh after 3 hours | |
1H ; retry after 1 hour | |
1W ; expire after 1 week | |
1D) ; minimum TTL of 1 day |
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
#Install plugin | |
bundle config set without 'development test' | |
bundle config set path 'vendor/bundle' | |
bundle install | |
bundle exec rake redmine:plugins NAME=redmine_checklists RAILS_ENV=production | |
touch tmp/restart.txt |
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
sudo -u www-data /usr/bin/php -f /var/www/html/owncloud/occ user:list --output=json --attributes=uid | jq 'del(.freakie)' | jq -r 'keys | .[]' |
NewerOlder