Skip to content

Instantly share code, notes, and snippets.

View adelatorrefoss's full-sized avatar

Toño de la Torre adelatorrefoss

View GitHub Profile
package com.gildedrose;
import static org.junit.jupiter.api.Assertions.assertEquals;
import org.junit.jupiter.api.Test;
public class GildedRoseTest {
@Test
public void quality_never_is_negative() {
# Thanks to Michael Walker
# https://github.com/CorndelWithSoftwire/Gilded-Rose-Python/blob/master/golden_master_test.py
import unittest
from gilded_rose import Item, GildedRose
class GoldenMasterTest(unittest.TestCase):
@adelatorrefoss
adelatorrefoss / GildedRoseTest.java
Last active September 16, 2020 15:30
A possible test solution for Gilde Rose Kata.
package com.gildedrose;
import static org.junit.Assert.*;
import org.junit.Test;
public class GildedRoseTest {
@Test
public void quality_never_is_negative() {
<?php
namespace Trovit\B2B\Redirect\Tests\integration\Controller;
class QueryStringBuilder
{
const CONNECTOR = '&';
const START = '/?';
private $brand;
<?php
namespace Trovit\B2B\Redirect\Tests\integration\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
private $client;
@adelatorrefoss
adelatorrefoss / BreakingAHardStaticDependencyKata.java
Last active March 7, 2019 14:07
Try to broke dependency on Configuration class
class SomeService {
private static String SOME_IMPORTANT_PARAMETER = Configuration.getPropertyFromDatabase("SOME_IMPORTANT_PARAMETER");
public void run() {
System.out.print(SOME_IMPORTANT_PARAMETER);
}
}
// This class simulates a framework deep configuration class, static and untouchable.
public class Configuration {
@adelatorrefoss
adelatorrefoss / GildedRoseTest.cs
Created November 27, 2018 07:27
A set of tests proposal for Gilded Rose Kata.
using System;
using System.Collections.Generic;
using Gilded_rose;
using Xunit;
namespace KataGildedRose.Tests
{
public class GildedRoseTest
{
string BACKSTAGE_NAME = "Backstage passes to a TAFKAL80ETC concert";
@adelatorrefoss
adelatorrefoss / taiga-better-backlog
Last active August 29, 2015 14:23
Taiga CSS better fit in window
.menu-secondary.sidebar {
width: 600px;
}
.sprints .sprint-table .column-us {
flex-grow: 1;
}
.sprints .sprint-table .column-points {
flex-grow: 0;
}
.sprints .sprint-table .us-name {

KALEIDOS EMACS MEETING

Confirmar para salir de emacs

(setq confirm-kill-emacs #’y-or-n-p)

Cambiar alternativamente entre dos buffers

(define-key global-map (kbd “M-o”) ‘mode-line-other-buffer)

Ampilar la fuente en emacs

(define-key global-map (kbd “C-+”) ‘text-scale-increase)

(define-key global-map (kbd “C–”) ‘text-scale-decrease)

Sacar ayuda al ejecutar un comando

C-h k > Ejecutar el comando que quieras ej: C-x c

@adelatorrefoss
adelatorrefoss / i3-bind-multimedia-keys.config
Created January 23, 2015 12:28
Binding multimedia keys in i3 window manager for Lenovo T440s
#bind multimedia keys
bindsym XF86AudioRaiseVolume exec --no-startup-id pactl set-sink-volume 1 -- +10% && pactl set-sink-mute 1 0
bindsym XF86AudioLowerVolume exec --no-startup-id pactl set-sink-volume 1 -- -10% && pactl set-sink-mute 1 0
bindsym XF86AudioMute exec --no-startup-id pactl set-sink-mute 1 toggle