Skip to content

Instantly share code, notes, and snippets.

View Diullei's full-sized avatar

Diullei Gomes Diullei

View GitHub Profile
@Diullei
Diullei / FizzBuzz.hs
Last active December 20, 2015 08:29
FizzBuzz implementation using Haskell http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz
{-
FizzBuzz implementation using Haskell
http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz
-}
fizzBuzz = [
if x `mod` 3 == 0 then
"Fizz"
else
if x `mod` 5 == 0 then
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Web.Http.Dependencies;
using Ninject;
using Ninject.Syntax;
public class NinjectDependencyScope : IDependencyScope
{
private IResolutionRoot resolver;
/*
underscore-1.4.4.d.ts may be freely distributed under the MIT license.
Copyright (c) 2013 Josh Baldwin https://github.com/jbaldwin/underscore.d.ts
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
@Diullei
Diullei / result.js
Created October 29, 2012 19:01 — forked from juandopazo/result.js
YUI TypeScript definitions
module Y {
interface Anim extends Base {
}
interface App extends App_Base, App_Content, App_Transitions, PjaxContent {
(config?: any);
@Diullei
Diullei / example.coffee
Created October 20, 2012 06:15 — forked from dc/example.coffee
ANSI styling — node.js
terminal = require('terminal')
console.log terminal.ANSIFormat("{{magenta}}Hello {{blue}}World!{{reset}}")
console.log terminal.ANSIStyle('red;inverse') + "ERROR:" + terminal.ANSIStyle('default;noinverse') + " method not found"
using System.Text;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
namespace TestProject1
{
[TestClass]
public class TestSmsDojo
{
[TestMethod]
PASSOS:
1) alterar no arquivo index.js o nome do projeto de "node-ant" para "node_ant" na geração da tag <project>. Isso foi necessário para conseguirmos recuperar a referência ao nome do projeto no código javascript que iremos escrever no teste item (3). Não sei como o ant gera o nome quando usamos "-" no meio desse nome.
2) alterar no arquivo jxon.js o trecho de código:
...
else if (key === 'keyValue') {
keyValue = cur;
}
<h1>teste</h1>
(function(exports){
function Carro(marca){
this.marca = marca;
// este é um campo privado.
// campos privados precisam ser definidos dentro do construtor da classe.
_km = 0;
}
Carro.prototype.getKm = function(){
(function(exports){
function Carro(marca){
this.marca = marca;
}
Carro.prototype.Km = 0;
Carro.prototype.andar = function(){
console.log(textoFormatado.call(this));
}