Skip to content

Instantly share code, notes, and snippets.

View codenuke's full-sized avatar

C0deNuke codenuke

View GitHub Profile
<?php
$ldap_host='your_host';
$ldap_user='your_user';
$ldap_pass='your_password';
$ldap_rdn = 'uid='.$ldap_user;
echo "LDAP Connecting ... <br>";
if ( $conn = ldap_connect( $ldap_host) )
@codenuke
codenuke / dropbox_auto_start
Created March 9, 2014 15:21
Dropbox Auto Start
#!/bin/sh
# dropbox service
# Replace with space delimited linux users you want to run Dropbox clients for
DROPBOX_USERS="user1 user2"
DAEMON=.dropbox-dist/dropbox
start() {
echo "Starting dropbox..."
for dbuser in $DROPBOX_USERS; do
@codenuke
codenuke / slam_filter_motor.py
Last active December 29, 2015 05:29
Homework of FRA638 (Mobile Robotics)
from math import sin, cos, pi
from lego_robot import *
from pylab import *
# This function takes the old (x, y, heading) pose and the motor ticks
# (ticks_left, ticks_right) and returns the new (x, y, heading).
def filter_step(old_pose, motor_ticks, ticks_to_mm, robot_width,
scanner_displacement):
r = motor_ticks[1] * ticks_to_mm