This gist is a collection of my rough notes from Strange Loop 2012.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ;; -*- coding: utf-8; mode: Scheme -*- | |
| ;; FizzBuzz en Scheme R5 (Kawa, Chicken) sin utilizar funciones de bibliotecas extras | |
| ;;------------------------------------------------------------------------ | |
| (define (my-iota n #!optional (i 0)) | |
| "Regresa una lista de N numeros naturales consecutivos que van desde | |
| I=0 hasta N-1 por default y opcionalmente desde I hasta N si se | |
| proporciona I >= 0" | |
| (if (and (>= n 0) (integer? n)) ;; Definida solo para los Naturales | |
| ;; Versión recursiva con NAMED LET es efectivamente iterativa | |
| (let loop ((j i) |
Delivered by Matthew McCullough on 2012-10-25
- http://teach.github.com/articles/lesson-continuous-delivery/
- http://teach.github.com/articles/lesson-continuous-integration/
Thanks for attending the talk!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # download latest libevent2 and tmux sources, and extract them somewhere | |
| # (thx bluejedi for tip on latest tmux URL) | |
| # | |
| # at the time of writing: | |
| # https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz | |
| # http://sourceforge.net/projects/tmux/files/latest/download?source=files | |
| # | |
| # install deps | |
| yum install gcc kernel-devel make ncurses-devel |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.catalina.loader.WebappLoader | |
| eventConfigureTomcat = { tomcat -> | |
| def newContextRoot = "/extjs_src" | |
| File newContextPath = new File( "C:/Developer/Tools/javascript/ext-4.2.0.663/src" ) | |
| if( newContextPath.exists() ) { | |
| context = tomcat.addWebapp( newContextRoot, newContextPath.getAbsolutePath() ) | |
| context.reloadable = true | |
| WebappLoader loader = new WebappLoader( tomcat.class.classLoader ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function _common_section | |
| printf $c1 | |
| printf $argv[1] | |
| printf $c0 | |
| printf ":" | |
| printf $c2 | |
| printf $argv[2] | |
| printf $argv[3] | |
| printf $c0 | |
| printf ", " |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //grails-app/conf/BootStrap.groovy | |
| import org.vertx.java.platform.PlatformLocator | |
| class BootStrap { | |
| def vertxPlatformManager | |
| def init = { servletContext -> | |
| vertxPlatformManager = PlatformLocator.factory.createPlatformManager() | |
| URL[] classpath = [new File('./src/verticles').toURI().toURL()] | |
| vertxPlatformManager.deployVerticle( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import groovyx.gpars.dataflow.KanbanFlow | |
| import groovyx.gpars.dataflow.KanbanLink | |
| import groovyx.gpars.dataflow.KanbanTray | |
| import groovyx.gpars.dataflow.ProcessingNode | |
| import static groovyx.gpars.dataflow.ProcessingNode.node | |
| /* | |
| A massively parallel game of life with KanbanFlow. | |
| Every cell signals to all neighbors when it has a new value. | |
| Every cell waits for signals from all its neighbors. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class FizzBuzz { | |
| String isPrintable ( divisor1=3, divisor2=5, number ) { | |
| (number % (divisor1 * divisor2) == 0) ? "FIZZBUZZ" : | |
| (number % divisor2 == 0) ? "BUZZ": | |
| (number % divisor1 == 0) ? "FIZZ": "$number" | |
| } | |
| Map calcula(List lista){ | |
| if(lista.size()==1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install tmux on Centos release 6.5 | |
| # http://superuser.com/questions/738829/attempting-to-install-tmux-on-centos-6-4-or-centos-6-5-fails-with-error-evbuff | |
| # | |
| # READ THIS FIRST!!! | |
| # MAKE SURE YOU HAVE BUILD TOOLS/COMPILERS TO BUILD STUFF FROM SOURCES | |
| # yum groupinstall "Development Tools" | |
| # CD TO TEMPORARY DIRECTORY |