Skip to content

Instantly share code, notes, and snippets.

View webfacer's full-sized avatar
🤪
just coding it!

Ilic Davor webfacer

🤪
just coding it!
View GitHub Profile
@webfacer
webfacer / robot.js
Created December 8, 2012 14:29
jinfu
// cloned robot from other gamer for understanding
var Robot = function(robot)
{
myID = robot.id;
direction = 1;
directionClone = -1;
robot.clone();
};
@webfacer
webfacer / robot.js
Created December 8, 2012 14:36
webfacer
function Robot(robot) {}
// well, we need to do something...
// whenever our robot is idle, this method gets called.
Robot.prototype.onIdle = function(ev) {
var robot;
robot = ev.robot;
robot.ahead(150);
robot.rotateCannon(360);
@webfacer
webfacer / dabblet.css
Created December 18, 2012 11:40 — forked from anonymous/dabblet.css
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.fancy-arrow {
width: 370px;
height: 35px;
color: #fff;
text-transform: uppercase;
background: #0e0e0e;
@webfacer
webfacer / dabblet.css
Created December 18, 2012 13:59
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
.fancy-arrow {
width: 370px;
height: 35px;
color: #fff;
text-transform: uppercase;
background: #0e0e0e;
@webfacer
webfacer / xml_encode.php
Created October 7, 2013 03:30
XML-Encoding from Object or Array.
<?php
function XMLEncode($obj, $level = 1, $xml = NULL)
{
if(!$obj){
return FALSE;
}
if($level==1)
{
$xml .= '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n";
@webfacer
webfacer / SassMeister-input.scss
Created April 10, 2014 19:46
Generated by SassMeister.com.
// ----
// Sass (v3.3.4)
// Compass (v1.0.0.alpha.18)
// ----
@mixin font-type( $name, $src, $style, $weight: 400 ) {
@font-face {
font-family: $name;
font-style: $style;
font-weight: $weight;
<?php
/**
* @description Echoes custom the_excerpt from any post id. the_excerpt is 7 words long as default
*
* @arguments mixed
* @param array $arguments default NULL array of arguments - the below mentioned + $limit
* @param int $post_id default NULL the id of the post, if null, the current post is taken
* @param string $cut default '...' when nothing setted it will take the current Postcontent from loop and excerpt it
*/
<?php
/**
* @description Used array( 'key' => 'your_post_meta_key', 'value' => mixed|int|string ) to get object of post_id's of key or value meta
*
* @author Davor Ilic
* @param array $meta can hold key or value
* @return mixed|object|bool
*/
function _get_post_id_by_meta( $meta = array() )
{
<polymer-element name="my-element">
<template>
<style>
</style>
</template>
<script>
Polymer('my-element', {
@webfacer
webfacer / easy-font-generator
Last active August 29, 2015 14:10
scss easy font family generator
//** File name for all font files.
$font-name: "Test" !default;
//** Element ID within SVG icon file.
$font-weights: (
"Light": "light",
"Medium": "medium",
"Regular": "regular",
"Thin": "thin",
"Bold": "bold",