Skip to content

Instantly share code, notes, and snippets.

View Myzel394's full-sized avatar

Myzel394

View GitHub Profile
@kjellski
kjellski / sshd_config
Created July 6, 2013 18:59
This is an example real-world sshd_config with a nice little example at the end. A match clause that enables different setting for specific ranges than general settings...
# This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options change a
# default value.
@xombiemp
xombiemp / lndir.sh
Last active January 13, 2026 14:28
This script will allow you to effectively hard link a directory. It reproduces the directory structure of the source in the destination and then recursively hard links all the files from the source to the corresponding location in the destination. If you've ever wanted to hard link a folder, this produces the results you want.
#!/bin/bash
oldifs=$IFS
IFS='
'
[ $# -ne 2 ] && { echo "Usage: $0 sourceDirectory destinationDirectory" ; exit 1; }
[ ! -d "$1" ] && { echo "$1 is not a valid directory"; exit 1; }
[ ! -d "$2" ] && { mkdir -p "$2"; }
src=$(cd "$1" ; pwd)
dst=$(cd "$2" ; pwd)
find "$src" -type d |
@djangofan
djangofan / test.xml
Created July 27, 2012 04:46
XML file sample
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<root testAttr="testValue">
<result>
<child>data1</child>
<child>A1343358848.646</child>
<child>
<internal>
<data>one</data>
<data>two</data>
<unique>Z1343358848.646</unique>
@shhong
shhong / nsb_entropy.py
Last active June 21, 2025 13:40
NSB entropy in python
#!/usr/bin/env python
"""
nsb_entropy.py
June, 2011 written by Sungho Hong, Computational Neuroscience Unit, Okinawa Institute of
Science and Technology
May, 2019 updated to Python 3 by Charlie Strauss, Los Alamos National Lab
This script is a python version of Mathematica functions by Christian Mendl