Skip to content

Instantly share code, notes, and snippets.

@Alotor
Alotor / 00_README.md
Last active January 16, 2018 13:14
New files streaming

New files stream

This file creates a stream that will emit values for each new file created in the directory watching. It's only dependency is the RxJava library, and uses inside the java.nio2 watch service for new values.

@Alotor
Alotor / kal-emacs.org
Last active August 29, 2015 14:19
Notas del Kaleidos-emacs friday's (24/04/2015)

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

@Alotor
Alotor / first_try.groovy
Last active August 29, 2015 14:14
Databinding
class Test {
String a
String b
String c
}
class Test2 {
String a
String b
String c
@Alotor
Alotor / cors.php
Last active August 29, 2015 14:11
PHP Script to enable CORS for GET methods
<?php
$ch = curl_init();
if (strcmp($_SERVER["REQUEST_METHOD"], "GET") == 0) {
curl_setopt($ch, CURLOPT_URL, $_REQUEST["url"]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec ($ch);
$contentType = curl_getinfo($ch, CURLINFO_CONTENT_TYPE);
plugins {
runtime ":admin-interface:0.6.4"
}
@Alotor
Alotor / Config.groovy
Last active August 29, 2015 14:03
Domain Configuration
grails.plugin.admin.domains = [
"conferences.Room",
"conferences.Attendee",
"conferences.Conference",
"conferences.Talk",
"conferences.Speaker"
]
@Alotor
Alotor / DslEvaluator.groovy
Last active August 29, 2015 14:01
Test DSL Evaluator that doesn't work as I expected
class DslEvaluator {
def methodMissing(String name, args) {
println "M >> $name $args"
}
def propertyMissing(String name, args) {
println "P >> $name"
}
}