Skip to content

Instantly share code, notes, and snippets.

:atom:
Powered by 5 Hour Energy

Daniel Ennis aikar

:atom:
Powered by 5 Hour Energy
Block or report user

Report or block aikar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:524021
<?php
class GEO
{
const
PI = M_PI,
TWOPI = 6.28318530718,
DE2RA = 0.01745329252,
RA2DE = 57.2957795129,
ERAD = 6378.135,
View gist:547865
<?php
$db = new PDO('sqlite:ai.db');
$db->exec('
CREATE TABLE IF NOT EXISTS
phrases
(
`word` INTEGER,
`left` INTEGER,
`right` INTEGER,
PRIMARY KEY (`word`, `left`, `right`)
View gist:548067
CREATE TABLE IF NOT EXISTS
words
(
`id` INTEGER PRIMARY KEY ASC,
`word` VARCHAR(45) NOT NULL
), INDEX `word` (`word`);
View gist:548383
>>> sqlite3 ai.db
SQLite version 3.3.6
Enter ".help" for instructions
sqlite> select * from words limit 10;
1|figured
2|out
3|issue
4|hack
5|the
6|planet
View gist:548902
<?php
class phpIBModule extends ModuleCore
{
private $db, $wordIdCache;
public function getWordId($word)
{
$db = $this->db;
$word = trim($word);
if(!$word) return 0;
View gist:593873
<?php
function DB($query, $args = NULL, $return = false) {
$stmt = DB::prepare($query);
if ($args !== NULL && !is_array($args) && func_num_args() == 2) {
//support DB(query,return)
$return = $args;
$args = array();
}
if (!is_null($args) && is_array($args)) {
View gist:602946
things im working with:
Mobile: media="handheld, handheld and (max-device-width: 480px), screen and (max-device-width: 480px)"
Non Mobile: media="only screen"
View DB.php
<?php
function DB($query, $args = NULL, $return = false) {
$stmt = DB::prepare($query);
if ($args !== NULL && !is_array($args) && func_num_args() == 2) {
//support DB(query,return)
$return = $args;
$args = array();
}
if (!is_null($args) && is_array($args)) {
View gist:623387
Date: 2010-10-12 23:40:22
ID: 55
Error occured in: Global
Count: 1
Message: ..\FrameXML\UIDropDownMenu.lua line 558:
attempt to index local 'frame' (a nil value)
Debug:
[C]: ?
..\FrameXML\UIDropDownMenu.lua:558: UIDropDownMenu_SetSelectedValue()
Auctionator\AuctionatorShop.lua:568: func()
View gist:629322
#showtooltip Sinister Strike
/console Sound_EnableSFX 0
/startattack
/use Bladefist's Breadth
/castsequence reset=0/combat/target Sinister Strike,Feint
/console Sound_EnableSFX 1
/script UIErrorsFrame:Clear()
You can’t perform that action at this time.