Skip to content

Instantly share code, notes, and snippets.

View stephen-hill's full-sized avatar

Stephen Hill stephen-hill

View GitHub Profile
@stephen-hill
stephen-hill / instructions.md
Last active May 14, 2018 20:32
Debian Notebook

Install Debian

  • Do not install a desktop environment

Minimal XFCE4

  • Login as root
  • Install sudo apt update;apt install sudo;
  • Create a user if required adduser USERNAME
  • Add your main user to sudo. usermod -a -G sudo USERNAME
  • Logout of root
@mindplay-dk
mindplay-dk / session-life-cycle.md
Last active March 28, 2024 19:52
Complete overview of the PHP SessionHandler life-cycle

This page provides a full overview of PHP's SessionHandler life-cycle - this was generated by a set of test-scripts, in order to provide an exact overview of when and what you can expect will be called in your custom SessionHandler implementation.

Each example is a separate script being run by a client with cookies enabled.

To the left, you can see the function being called in your script, and to the right, you can see the resulting calls being made to a custom session-handler registed using session_set_save_handler().

[playlist]
Title1=SomaFM: The Trip
File1=http://ice.somafm.com/thetrip
Title2=SomaFM: Deep Space One
File2=http://ice.somafm.com/deepspaceone
Title3=Linn Radio
File3=http://radio.linnrecords.com/cast/tunein.php/linnradio/playlist.pls
Title4=Trance1.FM
File4=http://yp.shoutcast.com/sbin/tunein-station.pls?id=162359
Title5=Moviester
@sameersbn
sameersbn / gitlab.conf
Created February 6, 2015 09:53
Nginx reverse proxy configuration for GitLab
upstream gitlab {
server 172.17.42.1:10080 fail_timeout=0;
}
# let gitlab deal with the redirection
server {
listen 80;
server_name git.example.com;
server_tokens off;
root /dev/null;
@othiym23
othiym23 / npm-upgrade-bleeding.sh
Created September 20, 2014 19:36
a safe way to upgrade all of your globally-installed npm packages
#!/bin/sh
set -e
set -x
for package in $(npm -g outdated --parseable --depth=0 | cut -d: -f3)
do
npm -g install "$package"
done
@kamermans
kamermans / rc.php
Created August 29, 2014 18:40
A better psysh/rc.php that automatically loads your composer autoloader
<?php
/**
* This is a better Psysh rc.php
*/
$add_composer_autoloader = function(array $config) {
static $was_run = false;
if ($was_run) {
return $config;
@raspi
raspi / smb.conf.ini
Last active March 12, 2021 16:24
FreeBSD ZFS Samba 4 config with recycle and read/write optimizations example
# Samba 4 config example
# Connected to existing remote Samba 4 Active Directory Directory Controller
# ZFS pool @ /storage
# Network is 192.168.101.0/24
# Samba is installed with:
# pkg install samba42
# and then joined to existing AD with:
# samba-tool domain join <params>
# After this /usr/local/etc/smb4.conf is edited and restarted with /usr/local/etc/rc.d/samba_server restart
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\9bis.com\KiTTY\Sessions\SESSION_NAME]
"Colour21"="255,255,255"
"Colour20"="245,222,179"
"Colour19"="200,240,240"
"Colour18"="0,217,217"
"Colour17"="179,146,239"
"Colour16"="174,129,255"
"Colour15"="122,204,218"
@mathiasverraes
mathiasverraes / TestFrameworkInATweet.php
Last active May 23, 2022 12:28
A unit testing framework in a tweet.
<?php
function it($m,$p){echo ($p?'✔︎':'✘')." It $m\n"; if(!$p){$GLOBALS['f']=1;}}function done(){if(@$GLOBALS['f'])die(1);}