Skip to content

Instantly share code, notes, and snippets.

View SBejga's full-sized avatar

Sebastian Bejga SBejga

View GitHub Profile
@SBejga
SBejga / linklist.html
Last active September 26, 2015 15:51
MobileWebDev
@SBejga
SBejga / ssmtp_mail_alias
Last active December 15, 2021 05:05
Bash Script as alias of "mail" using "ssmtp" in ubuntu. Main purpose is sending mails via munin by ssmtp instead of postfix.
#!/bin/bash
# mail syntax: mail -s "any mail subject string" [email protected]
# or: mail "any mail subject string" [email protected]
if [ $1 == "-s" ]
then
subject=$2
recip=$3
else
subject=$1
recip=$2
@SBejga
SBejga / wahlpflicht_mobile_web_development.md
Last active August 29, 2015 14:21
Wahlpflicht Vorlesung zum Thema "Mobile & Web Prototyping"

Titel: Mobile & Web Prototyping

Das Ziel dieser Wahlpflichtveranstaltung ist, die notwendigen Programmiersprachen, Technologien und Konzepte zu vermitteln, um in der Lage zu sein sehr schnell Mobile Anwendungen zu entwickeln. Dies umfasst sowohl die eigentliche App als auch den Server mit Datenbank (Backend).

Für die Entwicklung einer App wird "Swift" (iOS) thematisiert. Darauf aufbauend wird vorgestellt, wie man mit "Javascript" für mehrere mobile Plattformen entwickeln kann ("Apache Cordova"). Als Vorgehensmodell für das Entwickeln wird ebenfalls die Methodik "Design Thinking" präsentiert. Alle Inhalte werden abschließend als Labor/Projekt in Kombination angewendet und bewertet.

Inhalte:

  • Grundlagen Swift (iOS)
  • Grundlagen Javascript
@SBejga
SBejga / honeypot.sh
Created April 28, 2015 09:59
Honeypot with iptables on port 23
#!/bin/sh
HP_IPT='/sbin/iptables'
HP_Port=23
HP_Time=600
$HP_IPT -N honeypot
$HP_IPT -A INPUT ! -s 127.0.0.1 -j honeypot
$HP_IPT -A honeypot -m recent --update --seconds $HP_Time --name portscan -j DROP
$HP_IPT -A honeypot -p tcp -m tcp --dport $HP_Port -m recent --name portscan --set -j LOG --log-prefix "IPTABLES -- HONEYPOT -- P $HP_Port " --log-level 6 --log-ip-options
$HP_IPT -A honeypot -p tcp -m tcp --dport $HP_Port -m recent --name portscan --set -j DROP
$HP_IPT -A honeypot -j RETURN
//make + mocker + jasmine
it('should register component (single ID)', function(done) {
socket = io('http://localhost:' + port);
socketService.io.sockets.in('component1').emit('foobar', { foo: 'baz' });
socket.once('registerComponent', function(data) {
socketService.io.sockets.in('component1').emit('foobar', { foo: 'bar' });
});
@SBejga
SBejga / raw+jpeg-jpeg.sh
Created November 24, 2014 20:44
Lightroom Raw+JPG Remover of JPG files
#!/bin/bash
#change this to folder with target files/folders inside.
root=~/Pictures/2014
for f in $(find $root -name '*.CR2' -or -name '*.ARW');
do
fname=`echo $f | cut -d\. -f1`
if [ -e $fname.jpg ]
then