<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="http://wiki.tuxtrooper.fr/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="http://wiki.tuxtrooper.fr/feed.php">
        <title>Tuxtrooper Wiki - utils</title>
        <description></description>
        <link>http://wiki.tuxtrooper.fr/</link>
        <image rdf:resource="http://wiki.tuxtrooper.fr/lib/tpl/bootstrap3/images/favicon.ico" />
       <dc:date>2026-04-10T00:58:28+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=utils:aws&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=utils:git&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=utils:hardening&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=utils:iptables&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=utils:mail&amp;rev=1728939596&amp;do=diff"/>
                <rdf:li rdf:resource="http://wiki.tuxtrooper.fr/doku.php?id=utils:repo&amp;rev=1728939596&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="http://wiki.tuxtrooper.fr/lib/tpl/bootstrap3/images/favicon.ico">
        <title>Tuxtrooper Wiki</title>
        <link>http://wiki.tuxtrooper.fr/</link>
        <url>http://wiki.tuxtrooper.fr/lib/tpl/bootstrap3/images/favicon.ico</url>
    </image>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=utils:aws&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>aws</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=utils:aws&amp;rev=1728939596&amp;do=diff</link>
        <description>AWS

DynamoDB

Clear a table:


#!/bin/bash

TABLE_NAME=&quot;FILLME&quot;
HASH_KEY=&quot;FILLME&quot;
RANGE_KEY=&quot;FILLME&quot;

aws dynamodb scan \
  --attributes-to-get $HASH_KEY $RANGE_KEY \
  --table-name $TABLE_NAME --query &quot;Items[*]&quot; \
  | jq --compact-output &quot;.[]&quot; \
  | tr &#039;\n&#039; &#039;\0&#039; \
  | xargs -0 -t -I keyItem \
    aws dynamodb delete-item --table-name $TABLE_NAME --key=keyItem || exit 1</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=utils:git&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>git</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=utils:git&amp;rev=1728939596&amp;do=diff</link>
        <description>GIT

Managing repo


#!/usr/bin/env bash

update_git() {
    local dir=&quot;$1&quot;

    for subdir in &quot;$dir&quot;/*; do
        echo &quot;Going into $subdir&quot;
        if [[ -d &quot;$subdir&quot; ]]; then
            cd &quot;$subdir&quot; || exit
            if [[ -d .git ]]; then
                echo &quot;actions todo into git folder&quot;
            else
                update_git &quot;$subdir&quot;
            fi  
            cd -
        fi  
    done
}

if [[ &quot;$1&quot; == &quot;&quot; ]]; then
    dir_to_update=$(pwd)
else
    dir_to_update=&quot;$1&quot;
fi

for di…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=utils:hardening&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>hardening</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=utils:hardening&amp;rev=1728939596&amp;do=diff</link>
        <description>Hardening

MacOS


#!/bin/bash

# Disablebluetooth
sudo defaults write /Library/Preferences/com.apple.Bluetooth ControllerPowerState -int 0 
sudo killall -HUP blued

# Display bluetooth icon
defaults write com.apple.systemuiserver menuExtras -array-add &quot;/System/Library/CoreServices/Menu Extras/Bluetooth.menu&quot;

# Define ntp server
sudo systemsetup -setnetworktimeserver &lt;NTP server&gt; 
sudo systemsetup -setnetworktimeserver on

# Set time for screensaver
defaults -currentHost write com.apple.screens…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=utils:iptables&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>iptables</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=utils:iptables&amp;rev=1728939596&amp;do=diff</link>
        <description>IPtables


#!/bin/bash

##### IFACE SECTION #####
IFACE0=
IFACE1=

##### IP SECTION #####
ADMIN_NETWORK=
PROD_NETWORK=

DNS_SERVERS=
NAGIOS_SERVERS=
NTPD_SERVERS=
REPO_SERVERS=
SYSLOGD_SERVERS=

##### PORT SECTION #####
DNS_PORT=53
HTTPD_PORT=80
NTPD_PORT=123
SNMPD_PORT=161
SSHD_PORT=22
SYSLOGD_PORT=514

# Flush all tables
iptables -F
iptables -X
iptables -t nat -X
iptables -t nat -F
iptables -t mangle -X
iptables -t mangle -F


# Define all policies to drop
iptables -P INPUT DROP
iptables -P FO…</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=utils:mail&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mail</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=utils:mail&amp;rev=1728939596&amp;do=diff</link>
        <description>Send mail


{
        sleep 1
        echo &quot;helo $1&quot;
        sleep 1
        echo &quot;mail from:$2&quot;
        sleep 1
        echo &quot;rcpt to:$3&quot;
        sleep 1
        echo &quot;data&quot;
        sleep 1
        echo &quot;subject: $4&quot;
        sleep 1
        echo &quot; &quot;
        echo &quot;$5&quot;
        sleep 1
        echo &quot;.&quot;
        sleep 1
        echo &quot;QUIT&quot;
} | telnet &lt;MAILIP&gt; 25</description>
    </item>
    <item rdf:about="http://wiki.tuxtrooper.fr/doku.php?id=utils:repo&amp;rev=1728939596&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2024-10-14T20:59:56+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>repo</title>
        <link>http://wiki.tuxtrooper.fr/doku.php?id=utils:repo&amp;rev=1728939596&amp;do=diff</link>
        <description>Repositories management

	*  synchronization


#!/bin/bash

BW_LIMIT=4000
MIRRORS_PATH=&quot;/var/mirrors&quot;
RSYNC=&quot;rsync -avHz --delete --stats --bwlimit=$BW_LIMIT&quot;

MENU_ITEM=(
centos6
centos7
ubuntu14
exit
)

intro() {
    echo &quot;This script have been designed to create local repository of centOS 6,7 and ubuntu 14.04 LTS&quot;
    read -n 1 -p &quot;Press any key to continue&quot;
    clear
}

main() {
    echo &quot;#############&quot;
    echo &quot;# Main menu #&quot;
    echo &quot;#############&quot;
    echo &quot;&quot;
    echo &quot;Choose your distr…</description>
    </item>
</rdf:RDF>
