Skip to content

Instantly share code, notes, and snippets.

View tchalvak's full-sized avatar
🐙
making another SPA

Roy R. tchalvak

🐙
making another SPA
View GitHub Profile
} else if ($victom == "Group of Theives") {
$turn_cost = 1;
if (getcounter($username) <5) {
echo "A group of theives is waiting for you. They seem to be angered by your attacks on their Theif brethren."
$Group_attack= rand(200, 500)
if (!subtracthealth($username, $Group_attack)
How do I shot webs?
void function afunctionzors(){
sprintf("pie");
}
RRrrandom gist test!
var myTeam = this.team;
var eSoldiers = [];
var itemUpdateDelay = 0.5;
var itemTimer = 0;
var soldiersCount = 0;
var goldStormCD = 0;
var firstBlast = true;
var initiate = false;
var atkType = 2;
var manaBlastCD = this.now();
<?php
// Recursively determine the max
// Does not handle badly formed input
// Not yet optimized for performance
function my_max( $data ) {
if(is_int($data)){
return $data; // end of the line, just return the int
}
$max = null;
@tchalvak
tchalvak / recursive_integer_maximum
Created April 8, 2015 15:00
recursive_integer_maximum
<?php
// Recursively determine the max
// Does not handle badly formed input
// Not yet optimized for performance
function my_max( $data ) {
$max = null;
foreach($data as $elem){
$new_max = is_array($elem)? my_max($elem) : $elem;
$max = $new_max > $max? $new_max : $max;
@tchalvak
tchalvak / WhatTheFuckLNWhyDoYouActThisWay
Created December 29, 2014 18:36
WhatTheFuckLNWhyDoYouActThisWay
mkdir temp
cd temp
mkdir deploy
echo "Contents of the build file!" > deploy/resources.build.php
ln -s deploy/resources.build.php deploy/resources.php
cat deploy/resources.php
echo "That cat should work, but it doesn't, how the flip do people create symlinks in subdirectories then? So weird."