Skip to content

Instantly share code, notes, and snippets.

@dnk8n
dnk8n / dictreader.py
Last active January 2, 2025 19:44
Use openpyxl to return a dictreader
from pathlib import Path
from typing import Any, Callable, Dict, Iterator, List, Optional, Union
from openpyxl import load_workbook
def xlsx_dictreader(
filename: Union[str, Path],
sheet_index: int = 0,
header_row_index: int = 1,
@justincjahn
justincjahn / 10-cisco-elasticsearch.conf
Last active March 1, 2026 17:33
Logstash: Processing Cisco Logs
#
# INPUT - Logstash listens on port 8514 for these logs.
#
input {
udp {
port => "8514"
type => "syslog-cisco"
}
@eddmann
eddmann / SecureSessionHandler.php
Created April 9, 2014 12:18
Secure session handler implementation.
<?php
class SecureSessionHandler extends SessionHandler {
protected $key, $name, $cookie;
public function __construct($key, $name = 'MY_SESSION', $cookie = [])
{
$this->key = $key;
$this->name = $name;
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 8, 2026 01:02
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname