Skip to content

Instantly share code, notes, and snippets.

@jonayGodoy
jonayGodoy / .js
Last active March 28, 2019 05:34
es5 template
function Main() {
this.execute = function (){
//this is one comment
//your code
console.log("Hello world");
}
}
new Main().execute();
@jonayGodoy
jonayGodoy / .js
Created January 29, 2019 05:21
Template
class Main {
execute(){
//this is one comment
//your code
console.log("Hello world");
}
}
new Main().execute();
@jonayGodoy
jonayGodoy / .txt
Last active April 1, 2018 18:03
Expón tu ignorancia - sOn
1. leer Domain-Driven Design Distilled.
2. curso de entity framekork(migraciones)
3. curso de rabbit mq
4. Aprende más sobre la teoria de CQRS
5. crea un juguete romplible de CQRS
@jonayGodoy
jonayGodoy / static not static 2
Last active July 1, 2017 16:33
static not static 2
@Test
public void user_only_can_delete_own_commentary() throws Exception {
User user = new UserStub("user");
Commentary userCommentary = new Commentary("Hola mundo", anyUser);
Commentary anyCommentary = new Commentary("Hola mundo", new User("anyUser", new Authentication()));
Assert.assertTrue(user.deleteCommentary(userCommentary));
Assert.assertFalse(user.deleteCommentary(anyCommentary));
}
@jonayGodoy
jonayGodoy / static o not static 1
Last active July 1, 2017 16:32
static o not static 1
public class User {
private String name;
private Authentication authentication;
public User(String name, Authentication authentication) {
this.name = name;
this.authentication = authentication;
}
import React, {PropTypes} from 'react';
import {connect} from 'react-redux';
import * as courseActions from '../../actions/courseActions';
import {bindActionCreators} from 'redux';
import CourseForm from './CourseForm';
import toastr from 'toastr';
export class ManagerCoursePage extends React.Component {
constructor(props, context) {
@jonayGodoy
jonayGodoy / var_i_Omnipresence.js
Created April 1, 2017 03:42
var i Omnipresence
it('var i Omnipresence', function () {
var introductions = [],
names = ['Karl', 'Friedrich', 'Gauss'];
for (var i = 0; i < 3; i++) {
introductions[i] = (soAndSo) =>
`Hello, ${soAndSo}, my name is ${names[i]}`
}
introductions[1]('Raganwald').should.equal("Hello, Raganwald, my name is undefined");
@jonayGodoy
jonayGodoy / HelloWorldShould.java
Created January 15, 2017 12:23
Example Green Test
import org.junit.Assert;
import org.junit.Test;
public class HelloWorldShould {
@Test
public void testGreen() {
Assert.assertTrue(true);
}