Skip to content

Instantly share code, notes, and snippets.

@esummers
esummers / Samba Domain Controller.md
Last active November 14, 2024 07:53
Samba Domain Controller on a Raspberry Pi

Running a Samba 4.x Domain Controller on a Raspberry Pi

If you don't have a Windows server available for testing, a Raspberry Pi makes a great test environment. It works with Mac AD Binding, Apple Enterprise Connect, and the Mac Kerberos SSO Extension.

Configuring a Domain Controller on Rasbian or other Debian-based Linux distribution:

  1. Install Rasbian. Use NOOBS if you are new to Raspberry Pi at https://www.raspberrypi.org/downloads/. Optionally enable SSH or VNC support in Raspbian settings menu to remote in to the machine.

  2. Install Samba and related packages. Some packages may launch setup tools. Skip through the Kerberos configuration with defaults. We will be deleting the Kerberos configuration in a later step.

@krisleech
krisleech / renew-gpgkey.md
Last active April 15, 2025 07:27
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@treetop1500
treetop1500 / 1. composer.json
Last active January 19, 2022 08:26
Amazon S3 Force Download of Remote File with Symfony (AWS S3 PHP SDK V.3)
{
},
"require": {
"aws/aws-sdk-php": "3.*"
}
}
@mishterk
mishterk / MagnificPopupModal.vue
Last active December 16, 2021 13:15
Magnific Popup component for VueJS. Modified version of https://gist.github.com/antixrist/11f7d78fe680eb3bc15203a940b6b4f8
<template>
<div class="Modal mfp-hide" ref="modal">
<div class="Modal__inner">
<slot></slot>
</div>
</div>
</template>
@JBlond
JBlond / bash-colors.md
Last active April 19, 2025 20:25 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@wonderstory
wonderstory / _Flask_.md
Created June 1, 2017 06:09
Flask-uWSGI-nginx on CentOS 7

Small sample of Flask app with uWSGI and nginx on CentOS 7

(Replace example.com, /PATH/TO/CONTENT, APPNAME and USERNAME with yours.)

operations

nginx

$ sudo tee /etc/yum.repos.d/nginx.repo << 'EOF' > /dev/null

[nginx]

@andipaetzold
andipaetzold / dataURLToBlob.js
Created February 19, 2015 14:39
Data URL to Blob in JavaScript
// source: https://github.com/ebidel/filer.js/blob/b7ab6f4cbb82a17565ff68227e5bc984a9934038/src/filer.js#L137-159
var dataURLToBlob = function(dataURL)
{
var BASE64_MARKER = ";base64,";
if (dataURL.indexOf(BASE64_MARKER) == -1)
{
var parts = dataURL.split(",");
var contentType = parts[0].split(":")[1];
var raw = decodeURIComponent(parts[1]);
@codler
codler / gist:3906826
Created October 17, 2012 17:18
Support HTTP Header Range, mp4, php.php/mp4.mp4
<?php
# Nginx don't have PATH_INFO
if (!isset($_SERVER['PATH_INFO'])) {
$_SERVER['PATH_INFO'] = substr($_SERVER["ORIG_SCRIPT_FILENAME"], strlen($_SERVER["SCRIPT_FILENAME"]));
}
$request = substr($_SERVER['PATH_INFO'], 1);
$file = $request;
$fp = @fopen($file, 'rb');