h - Move left
j - Move down
k - Move up
l - Move right
$ - Move to end of line
0 - Move to beginning of line (including whitespace)
This file contains 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
{:ok, connection} = AMQP.Connection.open | |
{:ok, channel} = AMQP.Channel.open(connection) | |
message = Enum.join(System.argv, " ") || "Hello World!" | |
AMQP.Exchange.declare(channel, "logs", :fanout) | |
AMQP.Basic.publish(channel, "logs", "", message) | |
IO.puts " [x] Sent '#{message}'" |
This file contains 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
defmodule Expng do | |
defstruct [:width, :height, :bit_depth, :color_type, :compression, :filter, :interlace, :chunks] | |
def png_parse(<< | |
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, | |
_length :: size(32), | |
"IHDR", | |
width :: size(32), | |
height :: size(32), |
This file contains 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
# Changed to use content-type flag instead of header: -H 'Content-Type: application/json' | |
siege -c50 -t60S --content-type "application/json" 'http://domain.com/path/to/json.php POST {"ids": ["1","2","3"]}' |
This file contains 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 jhome | |
set -x JAVA_HOME (/usr/libexec/java_home $argv) | |
echo "JAVA_HOME:" $JAVA_HOME | |
echo "java -version:" | |
java -version | |
end |
This file contains 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 meta(f) { | |
console.log("en meta"); | |
f(); | |
} | |
var lista=[meta,meta,meta]; | |
var fun=function() { | |
console.log("funcion"); | |
} | |
for(var i=0;i<lista.length;i++) { | |
var item=lista[i]; |
This file contains 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 java.io.FileDescriptor; | |
import java.io.FileOutputStream; | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.io.PrintStream; | |
public class HelloWorld{ | |
private static HelloWorld instance; | |
public static void main(String[] args){ | |
instantiateHelloWorldMainClassAndRun(); |
This file contains 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 |
This file contains 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 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. |