Skip to content

Instantly share code, notes, and snippets.

View seqizz's full-sized avatar
💩
why the heck github has status support

Gürkan seqizz

💩
why the heck github has status support
View GitHub Profile
@seqizz
seqizz / hash.sh
Last active October 1, 2016 10:25
MD5 hash (blog)
#!/bin/ksh
ostype=`uname`
if [[ $ostype = "HP-UX" ]] ;then
echo "something" | openssl dgst -md5
elif [[ $ostype = "SunOS" ]]; then
echo "something" | digest -a md5
elif [[ $ostype = "Linux" ]]; then
echo "something" | md5sum | awk '{print $1}'
elif [[ $ostype = "AIX" ]]; then
@seqizz
seqizz / hpsum -h
Last active October 1, 2016 10:25
HPSUM help (blog)
[root@localhost]$ hpsum -h
HP Smart Update Manager 7.4.0
For CLI (legacy command) information:
hpsum --s [--help | --h]
To start HP SUM in interactive GUI mode:
hpsum [--port <#>] [--ssl_port <#>] [--open_firewall] [--overridedb]
To use interactive console mode:
hpsum <console_command> [--help | --h]
Supported console commands:
abort
@seqizz
seqizz / tunnel.sh
Created October 1, 2016 10:27
SSH tünel (blog)
ssh -v -C2qTnN -D 8080 -p22 kullanıcıadı@ipadresi
@seqizz
seqizz / trace.sh
Created October 1, 2016 10:28
kde error trace (blog
cat dafuqtrace.out | grep pam.d
stat("/etc/pam.d", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
open("/etc/pam.d/kde", O_RDONLY) = 3
open("/etc/pam.d/other", O_RDONLY) = 3
read(3, "auth required\tpam_deny.so\n"..., 4096) = 128
@seqizz
seqizz / iloreport.py
Last active October 12, 2016 14:53
HP ILO reporting script (blog)
#!/usr/bin/env python3
# gurkan,2016
# license info: http://www.wtfpl.net/
username = "ilo-username"
password = 'ilo-password'
import hpilo
@seqizz
seqizz / userChrome.css
Last active December 19, 2017 10:53
Delayed animation for sidebar and compact "tree style tab" extension tricks
#TabsToolbar {
visibility: collapse !important;
}
#sidebar-box[sidebarcommand="treestyletab_piro_sakura_ne_jp-sidebar-action"] #sidebar-header {
display: none;
}
/*
#sidebar-box, #sidebar-box *{ max-width:5em; min-width:50px;}
#sidebar-box:hover, #sidebar-box:hover *{ max-width:none!important;}
@seqizz
seqizz / dead.md
Last active March 26, 2018 10:31
Things to do to get fired (Linux version)
  • Set id:6:initdefault in /etc/inittab file
  • Write a script for system to randomly delete a single file without telling you every time you made a typographical error (wrong command).
  • chattr +i /etc/passwd or shadow, actually saw this on a server
  • add export PROMPT_COMMAND="cd" to profile file
  • chmod -x $(which chmod) or chmod -x $(readelf --header /bin/ls | grep interpreter | awk '{print $4}' | sed 's/]//')
  • upside-down-ternet
  • export EDITOR=$(which rm)

Sources as far as I remember: reddit, suicidelinux, HN

@seqizz
seqizz / personal_tst.css
Created May 4, 2018 09:51
My TST config
/* Adjust style for tab that has sound playing. */
.tab.sound-playing .label:before {
content: " 🔊 ";
}
/* Show title of unread tabs with red and italic font */
/*
.tab.unread .label {
color: red !important;
font-style: italic !important;
@seqizz
seqizz / psitool_cpu.py
Last active May 11, 2020 19:03
Linux CPU PSI helper
#!/usr/bin/env python3
from hashlib import sha256
from pickle import load, dump
from socket import gethostname
from time import time
def current_psi_dict():
with open('/proc/pressure/cpu', 'r') as psifile:
@seqizz
seqizz / split database dump
Last active August 1, 2021 03:04
Splitting --all-databases backup to per-database .sql files.
#!/usr/bin/perl -w
#
# Credit goes to: http://stackoverflow.com/questions/1876754/split-up-a-mysqldump-file-with-multiple-databases-by-database
#
# splitmysqldump - split mysqldump file into per-database dump files.
use strict;
use warnings;
my $dbfile;