Skip to content

Instantly share code, notes, and snippets.

View Chances.php
<?php
class Chances {
protected $max;
protected $pie;
protected $rnd;
public function __construct($max = 100) {
$this->max = $max;
View gist:f00e5d12dcf5bac1386f
// Arranca en el show() del screen. Cada vez que se muestra el lobby, va a checkTimer()
@Override
public void show() {
[..]
checkTimer();
super.show();
}
// Chequeo si ya tengo llenas las monedas (>30). En ese caso, el timer se inhabilita.
View index.html
<!DOCTYPE HTML>
<html lang="en">
<!--
*(c) Copyright 2011 Simone Masiero. Some Rights Reserved.
*This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License
-->
<head>
<meta charset="utf-8">
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js' type='text/javascript'></script>
@clasen
clasen / Counter.php
Last active Apr 24, 2019
Easy and dirty way to admin counters
View Counter.php
<?php
class Counter {
private $file;
public function __construct($file='counter') {
$this->file = $file . '.php';
}
View evoplate.php
<?php
require 'simple_html_dom.php';
$template_path = 'template/tagnu/';
$template_name = 'home.html';
$html = file_get_html($template_path . $template_name);
View update.php
<?php defined('SYSPATH') or die('No direct script access.');
class Database_Query_Builder_Update extends Kohana_Database_Query_Builder_Update {
/**
* Compile the SQL query and return it.
*
* @param object Database instance
* @return string
*/