Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Yup.

David Bazile dbazile

💭
Yup.
View GitHub Profile
@dbazile
dbazile / delegate-admin
Created Oct 27, 2020 — forked from Corgumolax/delegate-admin
Delegate admin for Zimbra 8 foss edition
View delegate-admin
#!/bin/bash
# Create delegated administrator on Zimbra 8.x FOSS Edition
# Credits to barrydegraaff: https://gist.github.com/barrydegraaff/d1549d7e3f1951067da2
# Warning: MUST be use as ZIMBRA user and DOMAIN variable MUST be set
# Delegated admin can create/modify accounts, alias, distribution lists and resources
# Domain of concern to be changed
DOMAIN='example.com'
View create uefi livecd fedora.sh
sudo dnf install livecd-tools
sudo livecd-iso-to-disk --efi --format Fedora-Workstation-Live-x86_64-32-1.6.iso /dev/sdb
View samizdat-shell-help.bash
#!/bin/bash
###
### my-script — does one thing well
###
### Usage:
### my-script <input> <output>
###
### Options:
### <input> Input file to read.
### <output> Output file to write. Use '-' for stdout.
@dbazile
dbazile / ffmpeg.md
Created Jun 29, 2020 — forked from protrolium/ffmpeg.md
ffmpeg guide
View ffmpeg.md

ffmpeg

Converting Audio into Different Formats / Sample Rates

Minimal example: transcode from MP3 to WMA:
ffmpeg -i input.mp3 output.wma

You can get the list of supported formats with:
ffmpeg -formats

Convert WAV to MP3, mix down to mono (use 1 audio channel), set bit rate to 64 kbps and sample rate to 22050 Hz:

View cloudformation IAM example.yaml
Resources:
Bucket:
Type: AWS::S3::Bucket
Properties:
BucketName: test-bucketname
BucketPolicy:
Type: AWS::S3::BucketPolicy
Properties:
Bucket: !Ref Bucket
View krebsonsecurity cert chain.txt
$ openssl s_client -connect krebsonsecurity.com:443 -showcerts <<< ''
CONNECTED(00000005)
depth=0 OU = Domain Control Validated, OU = PositiveSSL, CN = krebsonsecurity.com
verify error:num=20:unable to get local issuer certificate
verify return:1
depth=0 OU = Domain Control Validated, OU = PositiveSSL, CN = krebsonsecurity.com
verify error:num=21:unable to verify the first certificate
verify return:1
---
@dbazile
dbazile / SpringAdLdapTest.java
Created Mar 18, 2020 — forked from mpilone/SpringAdLdapTest.java
A simple example of using Spring LDAP to authenticate a user against Active Directory.
View SpringAdLdapTest.java
// Setup the LDAP client (normally done via Spring context file).
LdapContextSource contextSource = new LdapContextSource();
contextSource.setUrl("ldap://adserver.mycompany.com:3268");
contextSource.setBase("DC=AD,DC=MYCOMPANY,DC=COM");
contextSource.setUserDn("readonlyuser@ad.mycompany.com");
contextSource.setPassword("password1");
contextSource.afterPropertiesSet();
LdapTemplate ldapTemplate = new LdapTemplate(contextSource);
ldapTemplate.afterPropertiesSet();
@dbazile
dbazile / ffmpeg.md
Created Dec 29, 2019 — forked from steven2358/ffmpeg.md
FFmpeg cheat sheet
View ffmpeg.md
@dbazile
dbazile / init.groovy.d-jenkins--configure-globals.groovy
Created Dec 26, 2019
Jenkins initial bootstrapping Groovy scripts.
View init.groovy.d-jenkins--configure-globals.groovy
import jenkins.model.Jenkins
import jenkins.model.JenkinsLocationConfiguration
import hudson.tasks.Mailer
SYSTEM_NAME = 'Jenkins'
SYSTEM_EMAIL = 'jenkins@localhost'
def main() {
@dbazile
dbazile / certgen.py
Created Dec 17, 2019
scripting openssl to generate certificate chains easily
View certgen.py
#!/usr/bin/env python3
import argparse
import datetime
import getpass
import logging
import os
import re
import subprocess
import sys
You can’t perform that action at this time.