Skip to content

Instantly share code, notes, and snippets.

@kosztik
kosztik / media-query.css
Created October 26, 2018 17:07 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
@kosztik
kosztik / upload.pm
Last active August 3, 2019 09:23
upload check for suhosin
#!/usr/bin/perl
#use strict;
#use warnings;
# ===============================================================================================================
# ===================================== DEBUG START
# ===============================================================================================================
#open(my $fh, '>>', '/tmp/report.txt');
## feltolteskor a felhasznalo tulajdona lesz a file, es mas nem is tudja
#!/bin/bash
# Copyright (c) 2016, Florian Schaal, info@schaal-24.de
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted
DOW1=`date +%j`
# no of backups
DOW=`expr $DOW1 % 3`
@kosztik
kosztik / suhosinFirewall.sh
Last active August 7, 2019 04:41
punishment based on suhosin
#!/bin/bash
# run screen; screen -r; watch /root/suhsoinFirewall.sh
#
ip=tail -1 /var/log/syslog| grep suhosin |grep ALERT | grep -v memory_limit|grep "([0-9]{1,3}[\.]){3}[0-9]{1,3}" -o -E
#!/bin/bash
softMail=400
#^^^^^nincs használatban
maxMail=500
#^^^^^^^^^^ Ezt hasznalom jelenleg
@kosztik
kosztik / rename_accent
Last active August 31, 2019 05:51
rename accent files and dirs
#!/bin/bash
PATH="/home/ebfijjk/anks"
# Put the old filenames in a file.
ls $PATH >> oldValues
# Put the new names without accents in another file
cat oldValues | sed -e 'y/āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜĀÁǍÀĒÉĚÈĪÍǏÌŌÓǑÒŪÚǓÙǕǗǙǛ/aaaaeeeeiiiioooouuuuüüüüAAAAEEEEIIIIOOOOUUUUÜÜÜÜ/' >> newValues
@kosztik
kosztik / email-i.sh
Last active December 23, 2019 15:06
#!/bin/bash
#
# Use: email-i.sh /var/log/mail.info <from/to pattern>
# Used with postfix
if [[ $1 =~ gz ]]; then
cat="zcat"
else
@kosztik
kosztik / stm2csv.py
Last active February 27, 2020 13:17
convert bank stm to csv
#!/usr/bin/python
import sys
print ("tranzakcio tipus; banki azonosito; megbizas osszege; megbizas devizaneme; megbizo bankja; megbizo neve; megbizo szamlaszama; \
kozlemeny1; kozlemeny2; kozlemeny3; kozlemeny4; kedvezmenyezett bankja; kedvezmenyezett neve; kedvezmenyezett szamlaszama; \
bizonylatszam; hatarido; jovairas szamlaszama; jovairas devizaneme; jovairas vegso osszege; jovairas erteknapja; \
terheles szamlaszama; terheles devizaneme; terheles vegso osszege; terheles erteknapja")
filepath = sys.argv[1]
#!/usr/bin/env python
import socket
import struct
import sys
import os
def ip2int(addr):
return struct.unpack("!I", socket.inet_aton(addr))[0]
AUG
21
Mailpiler - Importing & Deduplicating email from PST Files
Hi there,
I'll be tackling getting mail from PST files into mailpiler, and deduping them before the import.
This howto is written for Ubuntu 16.04 - as my Piler install howto is for the same.