Skip to content

Instantly share code, notes, and snippets.

View binzram's full-sized avatar
🎯
Focusing

Nomar Znip binzram

🎯
Focusing
  • Bern to MVD
View GitHub Profile
@binzram
binzram / anti-aliasing-fedora.md
Last active August 29, 2015 14:23
Anti-aliasing in Fedora
  1. Add RPMFusion repositories:
sudo yum localinstall --nogpgcheck http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
  1. Install FreeType with subpixel rendering enabled:
sudo yum install -y freetype-freeworld

Proxytunnel Manual

# actions as root
ssh root@target
whoami                 # root
ls -al /bin/bash       # -rwxr-xr-x. 1 root root 1071992 18. Aug 15:37 /bin/bash
chmod u+s /bin/bash
ls -al /bin/nano       # -rwsr-sr-x. 1 root root 1071992 18. Aug 15:37 /bin/bash
@binzram
binzram / update_rrsig.sh
Created April 20, 2017 23:18
dnssec zone sign cron (2014-05-26)
#!/bin/sh
# Cron - every 2 weeks
BIND_RC="/etc/init.d/bind9"
BIND_HOME="/etc/bind"
ZONE_HOME="/etc/bind/zones"
ZONE_CONFIG="$BIND_HOME/named.conf.local"
SIGN_OPTS="-3 3DA89EE1"
zone_files=`grep -E "\"*.signed*\";" $ZONE_CONFIG | sed -E 's/.*file\s+\"//' | sed -E 's/\.signed\";//g'`
@binzram
binzram / bluewin_analysis.md
Created April 20, 2017 23:33
Bluewin analysis (2014-01-21)

Bluewin mail accounts have children adresses (familiy members) mapped to a main one. All children pws are via plain and accessible over the webinterface.

$ nmap -A sam.sso.bluewin.ch

Starting Nmap 6.40 ( http://nmap.org ) at 2014-01-21 21:40 CET
Nmap scan report for sam.sso.bluewin.ch (195.186.145.42)
Host is up (0.027s latency).
Not shown: 998 filtered ports
PORT    STATE SERVICE  VERSION
@binzram
binzram / zombie_catcher.sh
Created April 20, 2017 23:35
Zombie process catcher
#!/bin/bash
ps aux | awk '{if ($8 = "Z") print $1,$2,$8,$11;}' | tee /home/$USER/zombie.tmp
ZCOUNT=$(wc -l /home/$USER/zombie.tmp | awk '{print $1}')
ZCOUNT=$(expr $ZCOUNT - 1)
echo "Total $ZCOUNT zombie processes found."
rm -f /home/$USER/zombie.tmp
@binzram
binzram / find_mm_yyyy.sh
Created April 20, 2017 23:47
Find files in month range (2013-11-24)
#!/bin/sh
if [ "$#" -lt 2 ]; then
echo "Usage: `basename $0` MM YYYY [other find parameters]" >&2
exit 1
fi
set -e #exit early on error
month=$1
@binzram
binzram / Reflection.php
Created April 20, 2017 23:56
creates an reflection thumbnail (2013-11-25) similar to 1st gen Ipod product photos
<?php
namespace Reflection\ProcImg;
class Reflection{
private $size;
private $width;
private $height;
private $hoehe;
private $breite;
private $pathimg;
@binzram
binzram / overtone_demo.md
Last active April 21, 2017 00:02
Overtone demo presentation FHTB
PATH=$PATH:/home/binzram/dev/overtone
emacs

M-x cider-jack-in

(ns ch.tsbe.binz(:use 
			[overtone.live]
			[overtone.inst.sampled-piano]
			[overtone.inst.drum :only [quick-kick haziti-clap soft-hat open-hat]]))
package ch.bbc.wikicompare.algorythms;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class DiceCoefficent {
public double diceCoefficient(String s1, String s2)
{
Set<String> nx = new HashSet<String>();
#! /bin/sh
### BEGIN INIT INFO
# Provides: firewall
# Required-Start:
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Firewall-Script
# Description: Firewall-Script with IPTABLES
### END INIT INFO