Skip to content

Instantly share code, notes, and snippets.

View demogar's full-sized avatar
👋

Demostenes Garcia G. demogar

👋
View GitHub Profile
<VirtualHost www.pixmatstudios.com>
DocumentRoot /home/pixmatstudios.com/htdocs
ServerName www.pixmatstudios.com
<Directory "/home/pixmatstudios.com/htdocs">
allow from all
Options +Indexes
</Directory>
ServerAlias pixmatstudios.com www.pixmatstudios.com
</VirtualHost>
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('input.text').keyup(function() {
if ($(this).val().length > 0) {
$(this).next('input.text').focus();
}
});
});
</script>
Array
(
[players] => Array
(
[STEAM_0:1:2487] => Array
(
[frags] => 55
[frags_by_gun] => Array
(
[usp] => 12
<?php
// (...)
public function get_stats() {
# Open file
$log = fopen($this->config->item('archivos_path') . $this->file, 'r');
$players = array();
# If file exists, read it
if ($log) {
L 06/07/2010 - 17:15:56: Log file started (file "logs\L0607011.log") (game "cstrike") (version "48/1.1.2.6/4554")
L 06/07/2010 - 17:15:56: Server say "CAL config file has been executed""
L 06/07/2010 - 17:15:57: World triggered "Round_Start"
L 06/07/2010 - 17:15:59: "[qTp]-monty.~*<74><STEAM_0:1:2487><CT>" killed "[qTp]-Point<79><STEAM_0:0:6425282><CT>" with "usp"
L 06/07/2010 - 17:16:00: "[qTp]-monty.~*<74><STEAM_0:1:2487><CT>" killed "[qTp]-monsho<73><STEAM_0:0:1908859><CT>" with "usp"
L 06/07/2010 - 17:16:00: Rcon: "rcon 1125221520 "asdf" exec lo3.cfg" from "190.141.66.88:8322"
L 06/07/2010 - 17:16:00: Server say "Empezando luego de 3 Restarts!"
L 06/07/2010 - 17:16:02: Server cvar "sv_restartround" = "1"
L 06/07/2010 - 17:16:03: World triggered "Restart_Round_(1_second)"
L 06/07/2010 - 17:16:03: Team "CT" scored "0" with "5" players
<!-- javascript -->
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" />
<!-- css -->
<script src="http://code.jquery.com/jquery-1.4.4.min.js"></script>
<script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script>
<!DOCTYPE html>
<html>
<head>
/* JS, CSS, Meta tags, etc.. */
</head>
<body>
<div data-role="page">
<div data-role="header">
<form action="index_submit" method="get" accept-charset="utf-8">
<p>
<label for="nombre">Nombre</label>
<input type="text" name="nombre" value="" id="nombre" />
</p>
<p>
<input type="submit" name="submit" value="Submit" />
</p>
</form>
@demogar
demogar / gist:904211
Created April 5, 2011 18:39
jquery.name.validation
$(document).ready(function() {
// Agregamos un metodo nuevo para revisar el nombre
jQuery.validator.addMethod("check_name", function(value, element, params) {
return this.optional(element) || /^([a-zA-Z'-áéíóúÁÉÍÓÚ]+\s+){1,4}[a-zA-z'-áéíóúÁÉÍÓÚ]+$/i.test(value);
}, jQuery.format("Escribir Nombre + Apellido"));
// Validamos el form
$("#contact_form").validate({
rules: {
nombre: {
@demogar
demogar / chain_index.html
Created April 28, 2011 18:30
chain.js html example
<select id="persons">
<option>Person</option>
</select>
<input type="submit" name="some_name" value="Cambiar" id="some_name" />