Skip to content

Instantly share code, notes, and snippets.

Avatar
💩
why the heck github has status support

Gürkan seqizz

💩
why the heck github has status support
View GitHub Profile
@seqizz
seqizz / psitool_cpu.py
Last active May 11, 2020
Linux CPU PSI helper
View psitool_cpu.py
#!/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:
View personal_tst.css
/* 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 / funanswers.md
Last active Apr 19, 2018
Answer to fun questions
View funanswers.md

This is just my answer template for "Fun questions" section on sysadmin interview repo: https://github.com/chassing/linux-sysadmin-interview-questions#fun

A careless sysadmin executes the following command: chmod 444 /bin/chmod - what do you do to fix this?

First of all, I'd get the root privileges from that person away. As answer, I have 2 solutions:

  1. I'd create a dumb FS (like fat) on a loopback device and copy this file to there, since every file will have executable rights there.
  2. There is no problem, system is running without problems, so no need to fix.

I've lost my root password, what can I do?

@seqizz
seqizz / userChrome.css
Last active Dec 19, 2017
Delayed animation for sidebar and compact "tree style tab" extension tricks
View userChrome.css
#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 / trace.sh
Created Oct 1, 2016
kde error trace (blog
View trace.sh
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 / tunnel.sh
Created Oct 1, 2016
SSH tünel (blog)
View tunnel.sh
ssh -v -C2qTnN -D 8080 -p22 kullanıcıadı@ipadresi
@seqizz
seqizz / hash.sh
Last active Oct 1, 2016
MD5 hash (blog)
View hash.sh
#!/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 Oct 1, 2016
HPSUM help (blog)
View hpsum -h
[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 / iloreport.py
Last active Oct 12, 2016
HP ILO reporting script (blog)
View iloreport.py
#!/usr/bin/env python3
# gurkan,2016
# license info: http://www.wtfpl.net/
username = "ilo-username"
password = 'ilo-password'
import hpilo
@seqizz
seqizz / yeah.sh
Last active Jan 3, 2016
if [[ $? == 0 ]]; then
View yeah.sh
#!/bin/bash
# mfw script succeeded: https://asciinema.org/a/af1i594gccusvzk6oqbyugkvl
function animate {
echo -ne " $1\033[0K\r"
sleep 1
}
echo
You can’t perform that action at this time.