Skip to content

Instantly share code, notes, and snippets.

View dbasilioesp's full-sized avatar

David Basilio Espitalher dbasilioesp

View GitHub Profile
var P0x = 230;
var P0y = 50;
var P1x = 350;
var P1y = 150;
var px = P0x + t*(P1x - P0x)
var py = P0y + t*(P1y - P0y)
ctx.beginPath(); // inicia o desenho
ctx.rect(px,py , 20,20); // 20 20 é o tamanho do quadrado
#include <iostream>
#include <cmath>
using namespace std;
class Random {
private:
int seed;
#include <iostream>
#include <cmath>
using namespace std;
class Random {
private:
int seed;
@dbasilioesp
dbasilioesp / StyleGuideCppGames.md
Last active August 29, 2015 14:07
Style Guide C++ for Games

Style Guide C++ for Games

Introduction

This is a suggestion of how you should develop with the C++ language.
Style Guides are about consitency for the code and often more important in a project.

Code in Zen Mode

@dbasilioesp
dbasilioesp / gulpfile.js
Created November 24, 2014 11:44
Flow using Gulp
'use strict';
// Include Gulp & Tools We'll Use
var gulp = require('gulp');
var concat = require('gulp-concat');
var $ = require('gulp-load-plugins')();
var del = require('del');
var runSequence = require('run-sequence');
var browserSync = require('browser-sync');
var pagespeed = require('psi');
@dbasilioesp
dbasilioesp / spinner-clock.sass
Created December 12, 2014 12:06
Spinner Clock
$spinTime: 60s
.spinner-clock
position: relative:
width: 22px
height: 22px
border-radius: 50%
border: 2px solid $color-secondary
&:after
content: ""
@dbasilioesp
dbasilioesp / spinner-fill.sass
Created December 12, 2014 12:06
Spinner Fill
// <div class="spinner-css">
// <span class="side sp_right">
// <span class="fill"></span>
// </span>
// <span class="side sp_left">
// <span class="fill"></span>
// </span>
// <span class="spinner-css-loading"></span>
// </div>
@dbasilioesp
dbasilioesp / list_post_type.php
Created September 3, 2015 16:25
Listagem de posts do wordpress de forma customizada.
// Shortcode Agenda
function agenda_shortcode() {
//@ini_set('display_errors', 0);
$html = "";
$week = array('segunda', 'terca', 'quarta', 'quinta', 'sexta', 'sabado', 'domingo');
@dbasilioesp
dbasilioesp / shortcode.php
Last active April 19, 2016 18:32
Shortcode
<?php
// Add Shortcode
function special_title_shortcode( $atts , $content = null ) {
// Attributes
extract( shortcode_atts(
array(
'class' => '',
), $atts )
print "This is my game."
print "You liked the game whit me?"
print "Response yes or no."
quest = raw_input()
if quest == "yes":
print "Okay, let's go the menu."