Skip to content

Instantly share code, notes, and snippets.

View bernatfortet's full-sized avatar

Bernat Fortet bernatfortet

View GitHub Profile
function pressUp(){
pressKey('up');
}
function pressRight(){
pressKey('right');
}
function pressDown(){
pressKey('down');
.class{ color:red;}
@bernatfortet
bernatfortet / hcss.css
Last active October 10, 2015 22:08
HCSS Styling
=== HCSS Code Styling ===
1. Inline Styles ------------------------------------------------------------------
.content{ width:100px; height:100px; display:block; position:relative; left:-5px; top:-5px; float:none; margin:0; padding:20px; background:transparent url("../images/bkg.jpg") no-repeat center center; color:#000; ....}
Order --> Widht - Height / Display / Position / left, right, top, bottom / float / margins / paddings / background / color / text types / CSS3 features (text-shadow/ border radius / box-shadow) / opacity / overflow / z-index
basically is:
1 - dimensions/structural/positioning - background and font style - the rest
/*
USAGE
timer = gameObject.AddComponent<Timer>().setup( 1f, callBackHandler );
*/
using UnityEngine;
using System.Collections;
public delegate void TimerCallback();
"request": {
"action": "onStartGame",
"params": {
"numPlayers" : "3",
"game" : "mystique",
"humanPlayers": {
"0" : "player-0000",
"1" : "player-0001"
}
"aiPlayers": {
javascript:void((function(d){var e=d.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('src','https://gist.github.com/bernatfortet/6bb1a5216f4eda6fbecf/raw/292644a8a69eaf5125c6c8d9807c8aa3b419622e/linkedInUserDataToClipboard.js');d.body.appendChild(e);b_linkedIn();})(document));
@bernatfortet
bernatfortet / gameDevMapFilter.js
Created April 4, 2013 03:21
GameDevMap Filterer
var js = document.createElement('script');
js.src = 'http://code.jquery.com/jquery-1.9.1.min.js';
var first = document.getElementsByTagName('script')[0];
first.parentNode.insertBefore(js, first);
$("tr").each(function(){
var remove = true;
$(this).children("td").each(function(){
if( $(this).text() == "San Francisco" ){
remove = false;
using System;
namespace Dela.Mono.Examples
{
public class HelloWorld
{
public static void Main(string[] args)
{
string str = Console.ReadLine();
bool hasUniqueChars = true;
/* Eric Meyer's Reset CSS v2.0 - http://cssreset.com */
html,
body,
div,
span,
applet,
object,
iframe,
h1,
h2,
/*
* jQuery Easing v1.3 - http://gsgd.co.uk/sandbox/jquery/easing/
*
* Uses the built in easing capabilities added In jQuery 1.1
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
*
* Open source under the BSD License.
*