Skip to content

Instantly share code, notes, and snippets.

View clayfreeman's full-sized avatar

Clay Freeman clayfreeman

View GitHub Profile
@clayfreeman
clayfreeman / open-proxy-client.php
Last active May 12, 2023 16:14
Stream socket client in PHP using a HTTP CONNECT proxy
<?php
// Specify the hostname and port to which you wish to connect via HTTP proxy.
$target_hostname = 'www.google.com';
$target_port = 443;
// Specify whether the proxied connection should use TLS.
$target_crypto = TRUE;
// Specify the address of the HTTP proxy to use.
@clayfreeman
clayfreeman / concatenate-videos.sh
Last active January 13, 2021 02:12
A script to concatenate media files with matching codecs.
#!/bin/bash
set -euo pipefail
# A script to concatenate media files with matching codecs.
# Copyright (C) 2021 Clay Freeman
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

Keybase proof

I hereby claim:

  • I am clayfreeman on github.
  • I am clayfreeman (https://keybase.io/clayfreeman) on keybase.
  • I have a public key ASCeCQhOEYjfl9h4AXabf1cgjPKX5NLh5LJBnBWtvVdiPAo

To claim this, I am signing this object:

--- a/src/providers/ad/ad_opts.c
+++ b/src/providers/ad/ad_opts.c
@@ -215,7 +215,7 @@
{ "ldap_user_nds_login_disabled", NULL, SYSDB_NDS_LOGIN_DISABLED, NULL },
{ "ldap_user_nds_login_expiration_time", NULL, SYSDB_NDS_LOGIN_EXPIRATION_TIME, NULL },
{ "ldap_user_nds_login_allowed_time_map", NULL, SYSDB_NDS_LOGIN_ALLOWED_TIME_MAP, NULL },
- { "ldap_user_ssh_public_key", NULL, SYSDB_SSH_PUBKEY, NULL },
+ { "ldap_user_ssh_public_key", "sshPublicKey", SYSDB_SSH_PUBKEY, NULL },
{ "ldap_user_auth_type", NULL, SYSDB_AUTH_TYPE, NULL },
{ "ldap_user_certificate", NULL, SYSDB_USER_CERT, NULL },
@clayfreeman
clayfreeman / unstash.sh
Last active October 21, 2015 19:27
Un-stash the Applications directory on jailbroken devices.
#!/bin/bash
echo
echo "Please refer back to the post and use the updated (un)stashing method:"
echo "http://d.pr/17NjJ"
echo
@clayfreeman
clayfreeman / stash.sh
Last active October 21, 2015 19:26
Stash the Applications directory on jailbroken devices.
#!/bin/bash
echo
echo "Please refer back to the post and use the updated (un)stashing method:"
echo "http://d.pr/17NjJ"
echo
@clayfreeman
clayfreeman / gnuize.sh
Last active October 3, 2018 06:14
GNU-ize Mac OS X El Capitan
#!/bin/bash
# Install required packages from Homebrew
brew tap homebrew/dupes
brew install coreutils binutils diffutils ed findutils gawk gnu-indent gnu-sed \
gnu-tar gnu-which gnutls grep gzip screen watch wdiff wget bash gdb gpatch \
m4 make nano file-formula git less openssh python rsync svn unzip vim \
--default-names --with-default-names --with-gettext --override-system-vi \
--override-system-vim --custom-system-icons
brew cleanup
@clayfreeman
clayfreeman / move.sh
Last active August 29, 2015 14:08
move.sh — Cydia patch for iOS 8
#!/bin/bash
shopt -s extglob nullglob
if [[ ${1:0:1} == - ]]; then
v=$1
shift 1
else
v=
fi