Skip to content

Instantly share code, notes, and snippets.

<?php
$ldap_dn = "uid=".$_POST["username"].",dc=example,dc=com";
$ldap_password = $_POST["password"];
$ldap_con = ldap_connect("ldap.forumsys.com");
ldap_set_option($ldap_con, LDAP_OPT_PROTOCOL_VERSION, 3);
if(@ldap_bind($ldap_con,$ldap_dn,$ldap_password))
echo "Authenticated";
<?php
$ldap_dn = "cn=read-only-admin,dc=example,dc=com";
$ldap_password = "password";
$ldap_con = ldap_connect("ldap.forumsys.com");
ldap_set_option($ldap_con, LDAP_OPT_PROTOCOL_VERSION, 3);
if(ldap_bind($ldap_con, $ldap_dn, $ldap_password)) {
<?php
$ldap_dn = "cn=read-only-admin,dc=example,dc=com";
$ldap_password = "password";
$ldap_con = ldap_connect("ldap.forumsys.com");
ldap_set_option($ldap_con, LDAP_OPT_PROTOCOL_VERSION, 3);
if(ldap_bind($ldap_con, $ldap_dn, $ldap_password)) {
@scuba323
scuba323 / solozrized.txt
Created April 8, 2018 06:32
Solarized WeeChat Setup
# /secure passphrase A-PASSWORD
# ---- Defaults ----
/set irc.server_default.username "tracphil"
/set irc.server_default.nicks "tracphil, tracphil_"
/set irc.server_default.sasl_mechanism dh-blowfish
# ---- IRC Servers ----
# Nick and auth settings for freenode
/server add freenode chat.freenode.net

Contributing

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Please note we have a code of conduct, please follow it in all your interactions with the project.

Pull Request Process

  1. Ensure any install or build dependencies are removed before the end of the layer when doing a
@scuba323
scuba323 / bash-ps1.txt
Created November 16, 2017 04:56 — forked from gregdeane/bash-ps1.txt
Customize BASH PS1 prompt to show current GIT repository and branch
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
__git_ps1 ()
{
local b="$(git symbolic-ref HEAD 2>/dev/null)";
@scuba323
scuba323 / README-Template.md
Created August 12, 2017 02:25 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@scuba323
scuba323 / Python IRC Bot
Created August 5, 2017 14:56
Basic python irc bot that responds to irc server pings, can op/deop, voice/devoice, ban/unban, change topic, send notices, etc.
#!/usr/bin/env python
# victorvortex.py - A simple Python IRC bot
# Authors: mrtux and OldCoder
# License: CC BY-NC-SA 3.0
# Revision: see git rev.
#---------------------------------------------------------------------
# Suggestions.
# These are just suggestions: