Skip to content

Instantly share code, notes, and snippets.

View vmichnowicz's full-sized avatar
🖥️
Working

Victor Michnowicz vmichnowicz

🖥️
Working
View GitHub Profile
@vmichnowicz
vmichnowicz / backup.py
Created February 15, 2015 01:57
D-Link DCS-2330L Backup
import httplib2
import time
import os.path
username = "admin"
password = "password"
ip = "192.168.0.14"
mac = ""
url = "http://{}/config/sdcard_list.cgi?type=video&page=1&pagesize=999&path=/".format(ip)
/*
* KineticJS JavaScript Framework vdev
* http://www.kineticjs.com/
* Copyright 2013, Eric Rowell
* Licensed under the MIT or GPL Version 2 licenses.
* Date: 2014-05-10
*
* Copyright (C) 2011 - 2013 by Eric Rowell
*
@vmichnowicz
vmichnowicz / array_bsearch.php
Created October 23, 2012 21:56
PHP Binary Search
<?php
const ARRAY_LENGTH = 9999; // Length of our test array
const ITERATIONS = 9999; // Number of searches we will do
$array = array();
for ($i = 0; $i < ARRAY_LENGTH; $i++)
{
$array[] = isset($array[ $i - 1 ]) ? $array[ $i - 1 ] + rand(1, 25) : rand(1, 25);