Skip to content

Instantly share code, notes, and snippets.

View djdagovs's full-sized avatar
😆
Szczęśliwy

djdagovs djdagovs

😆
Szczęśliwy
View GitHub Profile
@djdagovs
djdagovs / raspi-motd.sh
Created January 23, 2020 20:26 — forked from piksel/raspi-motd.sh
Script for setting a nice raspberry pi logo as MOTD on debian.
#!/bin/bash
logo="$(tput setaf 2)
.~~. .~~.
'. \ ' ' / .'$(tput setaf 1)
.~ .~~~..~. $(tput sgr0) _ _ $(tput setaf 1)
: .~.'~'.~. : $(tput sgr0) ___ ___ ___ ___| |_ ___ ___ ___ _ _ ___|_|$(tput setaf 1)
~ ( ) ( ) ~ $(tput sgr0) | _| .'|_ -| . | . | -_| _| _| | | | . | |$(tput setaf 1)
( : '~'.~.'~' : ) $(tput sgr0) |_| |__,|___| _|___|___|_| |_| |_ | | _|_|$(tput setaf 1)
~ .~ ( ) ~. ~ $(tput sgr0) |_| |___| |_| $(tput setaf 1)
@djdagovs
djdagovs / dynmotd.sh
Created July 6, 2018 15:56 — forked from riipandi/dynmotd.sh
Simple Linux User Management
#!/bin/bash
# echo "" > /usr/bin/dynmotd; chmod +x /usr/bin/dynmotd; nano /usr/bin/dynmotd
USER=`whoami`
MEMORY1=`free -t -m | grep "buffers/cache" | awk '{print $3" MB";}'`
MEMORY2=`free -t -m | grep "Mem" | awk '{print $2" MB";}'`
# time of day
HOUR=$(date +"%H")
if [ $HOUR -lt 12 -a $HOUR -ge 0 ]; then
@djdagovs
djdagovs / dynmotd.sh
Created July 6, 2018 15:56 — forked from riipandi/dynmotd.sh
Simple Linux User Management
#!/bin/bash
# echo "" > /usr/bin/dynmotd; chmod +x /usr/bin/dynmotd; nano /usr/bin/dynmotd
USER=`whoami`
MEMORY1=`free -t -m | grep "buffers/cache" | awk '{print $3" MB";}'`
MEMORY2=`free -t -m | grep "Mem" | awk '{print $2" MB";}'`
# time of day
HOUR=$(date +"%H")
if [ $HOUR -lt 12 -a $HOUR -ge 0 ]; then
@djdagovs
djdagovs / Dockerfile
Created February 16, 2018 03:21 — forked from AubreyHewes/Dockerfile
BitchX Dockerfile (Docker, BitchX, Dockerised BitchX)
FROM ubuntu:14.10
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get upgrade -y --no-install-recommends && \
apt-get install -y --no-install-recommends \
build-essential \
libssl-dev \
ncurses-dev \

#Installing Alice's dependencies from the CPAN

Alice has a number of dependencies, all of which can be installed from the CPAN1. The simplest way to get these installed is with the cpanm tool.

Install cpanm by running

curl -L http://xrl.us/cpanm | perl - --sudo App::cpanminus

Check out alice's git repository

@djdagovs
djdagovs / setup.sh
Created January 13, 2018 02:55 — forked from bossjones/setup.sh
#!/bin/bash
######
#LICENCE#
######
#Released under the BSD license http://www.opensource.org/licenses/bsd-license
#Copyright (c) 2011, Rowan Wookey <[email protected]>
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
@djdagovs
djdagovs / myweechat.md
Created January 13, 2018 02:36 — forked from bossjones/myweechat.md
My always up-to-date WeeChat configuration (weechat-dev)

WeeChat Screenshot

Enable mouse support

/mouse enable

Encrypted password in sec.conf

@djdagovs
djdagovs / header.sh
Created January 13, 2018 01:07 — forked from fishi0x01/header.sh
Dynamic login messages with update-motd framework. Code for blog post http://fishi.devtail.io/weblog/5/
# Simple static header for update-motd framework
COLOR_GREEN="\033[0;32m"
# print personal static banner in green
printf "${COLOR_GREEN}
_____ .__ .__ .__
_/ ____\|__| ______| |__ |__|
\ __\ | | / ___/| | \ | |
| | | | \___ \ | Y \| |
@djdagovs
djdagovs / systemstats.sh
Created January 13, 2018 01:05 — forked from tavy315/systemstats.sh
/usr/local/bin/systemstats.sh
#!/bin/bash
#
# Server Status Script
# Version 0.1.5
# Updated: September 15th 2017
CPUTIME=$(ps -eo pcpu | awk 'NR>1' | awk '{tot=tot+$1} END {print tot}')
CPUCORES=$(cat /proc/cpuinfo | grep -c processor)
UP=$(echo `uptime` | awk '{ print $3 " " $4 }')
@djdagovs
djdagovs / raspberryPi-logininfo.sh
Created January 13, 2018 00:45 — forked from nabossha/raspberryPi-logininfo.sh
starting point for displaying useful login info (motd) on a raspberryPi
#!/bin/sh
# dynamische MOTD
# Aufruf in /etc/profile (letzte Zeile)
# Hostname
HOSTNAME=`hostname -f`
# letzter Login
LAST1=`last -2 -a | awk 'NR==2{print $3}'` # Wochentag
LAST2=`last -2 -a | awk 'NR==2{print $5}'` # Tag