Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Christian M. Grube seraphyn

🏠
Working from home
View GitHub Profile
View .screenrc
startup_message off
deflogin on
vbell on
vbell_msg " Wuff ---- Wuff!! "
defscrollback 1024
bind ^k
bind ^\
bind \\ quit
bind K kill
bind I login on
@seraphyn
seraphyn / sshantiscan_honeypot.sh
Created Feb 27, 2015
Put your sshd on another Port and if somebody scans port 22 he will be blocked for 10 minutes
View sshantiscan_honeypot.sh
#!/bin/sh
# Put SSHd on another Port
# If someone scans your typical sshport 22 he will be blocked for 10 Minutes
HP_IPT='/sbin/iptables'
HP_Port=22
HP_Time=600
$HP_IPT -N honeypot
$HP_IPT -A INPUT ! -s 127.0.0.1 -j honeypot
@seraphyn
seraphyn / funtions.php
Created Jul 26, 2014
Lösung für RichSnippets in dem Theme Twenty Thirteen von Wordpress. Gehört zu dem Kommentar von Janet ( http://got-tty.org/archives/rich-snippets-in-wordpress-und-google.html#comment-6102) des Beitrages http://got-tty.org/archives/rich-snippets-in-wordpress-und-google.html
View funtions.php
<?php
//mod content
function hatom_mod_post_content ($content) {
if ( in_the_loop() && !is_page() ) {
$content = '’.$content.”;
}
return $content;
}
add_filter( ‘the_content’, ‘hatom_mod_post_content’);
@seraphyn
seraphyn / 000-default
Created Jan 11, 2014
000-default genutzt in der Anleitung Friendica in Debian Wheezy installieren
View 000-default
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/friendica
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/friendica>
Options Indexes FollowSymLinks MultiViews
@seraphyn
seraphyn / browserselect
Last active Dec 31, 2015
Browserselect ist ein Script welches die ProzessID (PID) des momentan laufenden Browsers sucht und allen Programmen, welche eine Seite öffnen wollen, den laufenden Browser zuweist.
View browserselect
#!/bin/bash
# GNU GPL v3
# the order in which to execute the commands
# breaks on success
# available are the following commands:
#
# firefox_new_tab
# opera_new_tab
#
# firefox_new_win
@seraphyn
seraphyn / shrinkpdf.sh
Last active Dec 31, 2015
Shellscript um mit Hilfe von ghostscript PDFs zu verkleinern. Die DPI liegt bei 72 und sollte für Retina dann eher in Richtung 200 geändert werden. Ich habe so ein Display am Thinkpad nicht und somit ist es für mich noch obsolet. Aber die dpi sind ausreichend für "normale" Androidsmartphones und Tablets im Moment
View shrinkpdf.sh
#!/bin/sh
# Original by Alfred Klomp
gs -q -dNOPAUSE -dBATCH -dSAFER \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.3 \
-dPDFSETTINGS=/screen \
-dEmbedAllFonts=true \
-dSubsetFonts=true \
-dColorImageDownsampleType=/Bicubic \
@seraphyn
seraphyn / cfg_notion.lua
Created Nov 29, 2013
Notion Konifguration
View cfg_notion.lua
-- Ion main configuration file
--
-- This file only includes some settings that are rather frequently altered.
-- The rest of the settings are in cfg_ioncore.lua and individual modules'
-- configuration files (cfg_modulename.lua).
--
-- Set default modifiers. Alt should usually be mapped to Mod1 on
-- XFree86-based systems. The flying window keys are probably Mod3
-- or Mod4; see the output of 'xmodmap'.
View speedtestnet_serverlist.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings>
<servers><server url="http://speedtest.pronea.no/speedtest/upload.php" lat="69.6828" lon="18.9428" name="Tromso" country="Norway" countrycode="NO" sponsor="Pronea AS" sponsorurl="http://www.pronea.no/" id="1327" gid="0" url2="http://speedtest.pronea.no/speedtest/upload.php" bigsamples="1" />
<server url="http://speedtest.mmsn.ru/speedtest/upload.php" lat="68.9667" lon="33.0833" name="Murmansk" country="Russian Federation" countrycode="RU" sponsor="JSC M2C" sponsorurl="http://www.mmsn.ru" id="1521" gid="0" url2="http://speedtest.mmsn.ru/speedtest/upload.php" bigsamples="1" />
<server url="http://st1.teletoria.ru/speedtest/upload.php" lat="68.9667" lon="33.0833" name="Murmansk" country="Russian Federation" countrycode="RU" sponsor="ISP Teletoria" sponsorurl="http://www.teletoria.ru" id="2342" gid="0" url2="http://st1.teletoria.ru/speedtest/upload.php" bigsamples="1" />
<server url="http://speedtest.oltv.ru/speedtest/upload.php" lat="68.1500" lon="33.2833" nam
@seraphyn
seraphyn / updatevirtualboxextions
Created Dec 20, 2012
Checks if the Extension Pack version matches the installed VirtualBox version and if not, delete the Extension Pack, downloads and installs the new one.
View updatevirtualboxextions
#! /bin/bash
#
#: Title : updateVboxExt
#: Date Created: Fri May 13 13:54:26 PDT 2011
#: Last Edit : Fri May 13 14:34:37 PDT 201
#: Author : please_try_again
#: Version : 1.0
#: Description : Install or update VirtualBox Extension pack
pkg_sit="http://download.virtualbox.org/virtualbox/"
View Xterm256 color names for console Vim
hi x016_Grey0 ctermfg=16 guifg=#000000
hi x017_NavyBlue ctermfg=17 guifg=#00005f
hi x018_DarkBlue ctermfg=18 guifg=#000087
hi x019_Blue3 ctermfg=19 guifg=#0000af
hi x020_Blue3 ctermfg=20 guifg=#0000d7
hi x021_Blue1 ctermfg=21 guifg=#0000ff
hi x022_DarkGreen ctermfg=22 guifg=#005f00
hi x023_DeepSkyBlue4 ctermfg=23 guifg=#005f5f
hi x024_DeepSkyBlue4 ctermfg=24 guifg=#005f87
hi x025_DeepSkyBlue4 ctermfg=25 guifg=#005faf