Skip to content

Instantly share code, notes, and snippets.

View psykzz's full-sized avatar

Matt psykzz

View GitHub Profile
function updateUser ($userID,$userData) {
$salt = $this::MD5_SALT;
if ($userData['password']=!"") {
$password = md5("{$salt}:{$userData['password']}");
$SQL =
"UPDATE `tblUsers`
SET `username`=?, `password`=?, `group`=? `access`=?
WHERE `user_id`=?;";
} else {
$SQL =
<script>
<!-- // Timeout for reloading the fucking shit.
var repeatTimer = 3000;
var timer = false;
$(document).ready(function(){
$(window).bind("focus",function(event){
if (repeatTimer!=3000) {
repeatTimer = 3000;
timer = setTimeout(function(){load()},repeatTimer);
}
public int Log(string channel="local", int index=1)
{
if (channel == "") return 0;
try
{
FileInfo lastUpdatedFile = GetLastUpdatedFileInDirectory(channel);
if (lastUpdatedFile == null)
{
MessageBox.Show("Unable to locate gamelogs", "Couldn't Find File");
return 0;
@psykzz
psykzz / dbLayer.class.php
Created September 8, 2012 12:03
Method chaining PDO abstract DB layer
<?php
class dbLayer {
private $hostname;
private $username;
private $password;
private $dbname;
private $current_query;
private $validQuery; // while not perfect should be good enough to say if we have chosen a starter and finisher atleast.
@psykzz
psykzz / dbLayer.class.php
Last active June 2, 2021 18:21
Method chaining PDO abstract DB layer
<?php
class dbLayer {
private $hostname;
private $username;
private $password;
private $dbname;
private $current_query;
private $validQuery; // while not perfect should be good enough to say if we have chosen a starter and finisher atleast.
@psykzz
psykzz / downloader.class.php
Created September 9, 2012 21:51
Simple rate limited downloader.
<?php
/* *
* @filename downloader.class.php
* @author PsyKzz
* @version 1.0.0
* @description Simple class to rate limit your downloads, while also providing a custom tickrate to combat timeout issues.
* @url http://www.psykzz.co.uk
*
* @license 'WTFPL ' - "Do What The Fuck You Want To Public License".
* This program is free software. It comes without any warranty, to
#include <stdio.h>
int main(int argc, const char * argv[])
{
int number, right_digit;
printf("Enter your Number: ");
scanf("%i", &number);
do {
@psykzz
psykzz / main.m
Created September 25, 2012 22:32
//
// main.m
// p91e2
//
// Created by David Gardiner on 25/09/2012.
// Copyright (c) 2012 David Gardiner. All rights reserved.
//
#import <Foundation/Foundation.h>
//Configurational Defines.
#define EVAC_HELI "Mi17_Civilian"
_wait = 2;
// Functions
FNC_moveToAndLand = {
private ["_heli","_dest"];
_heli = _this select 0;
_evacHeli = _this select 1;
_dest = _this select 2;
//Configurational Defines.
#define EVAC_HELI "MH6J_EP1"
_wait = 2;
// Functions
FNC_moveToAndLand = { // USAGE : _evacHeli, _Destination] call FNC_moveToAndLand;
private ["_heli","_dest","_pilot"];
_evacHeli = _this select 0;
_dest = _this select 1;
_pilot = (crew _evacHeli select 0);