Skip to content

Instantly share code, notes, and snippets.

View DfKimera's full-sized avatar
🦊

Aryel Tupinambá DfKimera

🦊
View GitHub Profile
#include <amxmodx>
#include <amxmisc>
#include <engine>
#include <fun>
#include <fakemeta>
new plyRadio[32];
new Float:plyRadioOrigin[32][3];
public plugin_init() {
<html>
<body>
<script type="text/javascript">
var images = ['lorem','ipsum','dolor','sit','amet'];
function selectImage(url) {
var before, after;
/*
* Updates the database with local variables. The design implies that only
* these two vars, lastposition and state, need to be updated, as everything
* else is done directly into the database and then refreshed into the script
* This will later serve for the live server preview
*/
public AMS_UpdatePlayerPos() {
// Create some control/storage variables
new plyOrigin[3], plyOriginString[256]; // lNull[1];
@DfKimera
DfKimera / gist:1078738
Created July 12, 2011 19:17
maxLeft calculation using browser viewport in jQuery (for absolute positioning)
<html>
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
</head>
<body style="overflow: hidden; margin: 0;">
<div id="portfolio" style="width: 2000px; position: relative; border: 3px solid red; background: #eee; left: 0;">asdf asdf asdf asf asdf asdf asdf sfdg fghfgh jhgj hjkjlh fb vc bxcvb xcb etr 43g545i45hghw3 083wh 0f89wh3 9f8wh349f8w3hf9 8hf9 8w3h4f9 8w3h4f9 8w3h4f 9w83hf 9w34f 09w384hf 9w348f hw34hf ow3ih f9w384 fh9w348fy w93 fw34n fiuhiefundriugshr98</div>
@DfKimera
DfKimera / components.formvalidator.js
Created August 25, 2011 19:05
Form validation component
function validate_form(fields, invalidCallback, validCallback) {
if(!fields) {
invalidCallback();
return false;
}
invalid = [];
for(var i in fields) {
f = fields[i];
@DfKimera
DfKimera / example.js
Created August 25, 2011 19:08
Form validator example
var fields = [
{id: 'input_name', label: 'Nome', mode: 'string', min: 3, max: 128},
{id: 'input_lastName', label: 'Sobrenome', mode: 'string', min: 3, max: 128},
{id: 'input_email', label: 'E-mail', mode: 'string', min: 5, max: 128},
{id: 'input_password', label: 'Senha', mode: 'password', match: 'input_confirmPassword', min: 6},
{id: 'input_birthCity_cityID', label: 'Cidade onde nasceu', mode: 'number', incorrect: 0},
{id: 'input_livingCity_cityID', label: 'Cidade onde vive', mode: 'number', incorrect: 0},
{id: 'recaptcha_response_field', label: 'Palavras de seguran&ccedil;a', mode: 'string', min: 1}
];
@DfKimera
DfKimera / gist:1193806
Created September 5, 2011 00:52
money.io color pallete
Blue:
Very dark: #165c92
Dark: #2979a5
Medium: #0e7cb6
Light: #97ceed
@DfKimera
DfKimera / gist:1199967
Created September 7, 2011 07:26
Tester for BallisticSimulationDLL
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BallisticSimulationDLL;
namespace BallisticSimulationDLL_Tester {
class Program {
static void Main(string[] args) {
@DfKimera
DfKimera / roll.a.barrel.js
Created December 9, 2011 14:38
Roll-a-barrel!
(function(){var r=0,mr=360;setInterval(function(){(r<mr)?r++:r=0;document.body.style['-webkit-transform']='rotate('+r+'deg)';}, 1);})();
<?php
try {
$client = new SoapClient("http://localhost/labs/soap/AccedoService.wsdl");
var_dump($client);
var_dump($client->__getFunctions());
var_dump($client->authenticationByCodeId(1));
} catch (Exception $ex) {