Skip to content

Instantly share code, notes, and snippets.

View nunomazer's full-sized avatar
🎯
Coding ... allways

Ademir Mazer Jr [ Nuno ] nunomazer

🎯
Coding ... allways
View GitHub Profile
@nunomazer
nunomazer / rand-ex.c
Created March 5, 2011 19:04
exemplo de geração de números aleatórios/randômicos em C
#include <stdio.h>
#include <stdlib.h>
int main ( ) {
int inteiro, x;
printf("*** EXEMPLOS PARA USO DA FUCAO RAND ***\n\n");
inteiro=rand();
printf("inteiro aleatorio sem geracao de semente: %d\n",inteiro);
@nunomazer
nunomazer / cv-completo.html
Last active April 10, 2024 23:25
exemplo de html com css utilizando dados de um curriculo vitae
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Curriculo Vitae</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
@nunomazer
nunomazer / install-latex-cls.sh
Created March 22, 2011 17:26
Install a new Latex class in your Ubuntu's system
#!/bin/bash
# script para instalacao de classes Latex
# installation script of Latex class
# v.0.1 - 22/03/2011
# Ademir Mazer Jr [ Nuno ]
# http://ademir.winponta.com.br
# testa se foi informado o nome da classe
# test if the class name is informed
if [ $# -lt 1 ]; then
@nunomazer
nunomazer / relogio-thread.c
Created May 10, 2011 19:32
Exemplo de relógio utilizando threads em Dev-C
#include
#include
#include
#include
int executando;
// variavel global que controlar se o aplicativo esta executando
// ela garantira o encerramento das threads abertas quando seu valor for zero
void relogio () {
// o tipo long comporta numeros nao fracionados
// com valor superior (longo) ao tipo
@nunomazer
nunomazer / bg.css
Created May 24, 2011 15:48
Background image in HTML using pure CSS (not CSS3)
#background {
width: 100%;
height: 100%;
position: fixed;
left: 0px;
top: 0px;
z-index: -1;
}
.stretch {
@nunomazer
nunomazer / reset.css
Created July 22, 2011 21:48
reset css file to help older browsers recognize HTML 5 tags
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,
a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,
small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,
form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video{
margin:0;padding:0;border:0;outline:0;font-size:100%;vertical-align:baseline;background:transparent}
/* HTML5 display-role reset for older browsers */
namespace.views.MyWizard = Backbone.Views.extend({
initialize: function() {
_.bindAll(this, 'render', 'wizardMethod');
}
render: function() {
this.wizardMethod();
return this;
},
var SomeModel = Backbone.Model.extend({});
someModel = new SomeModel();
someModel.bind("change", function(model, collection){
alert("You set some_attribute to " + model.get('some_attribute'));
});
someModel.set({some_attribute: "some value"});
@nunomazer
nunomazer / application.coffee
Created May 14, 2012 15:39 — forked from caleywoods/application.coffee
Backbone JS / Fullcalendar
$ ->
Event = Backbone.Model.extend()
Events = Backbone.Collection.extend({
Model: Event,
url : 'events'
})
EventsView = Backbone.View.extend({
initialize: ->
@nunomazer
nunomazer / gist:3219809
Created July 31, 2012 19:31 — forked from FlorianX/gist:1965947
dynamic loaded Zend ACL
<?php
/**
* ACL Plugin
* @package Plugin
* @author FlorianX
*/
class Plugin_Auth_Acl extends Zend_Acl
{
private $_roleRecursionStop = array();
private $_resourceRecursionStop = array();