You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A quick guide to write a very very simple "ECHO" style module to redis and load it. It's not really useful of course, but the idea is to illustrate how little boilerplate it takes.
Step 1: open your favorite editor and write/paste the following code in a file called module.c
#include"redismodule.h"/* ECHO <string> - Echo back a string sent from the client */intEchoCommand(RedisModuleCtx*ctx, RedisModuleString**argv, intargc) {
Minecraft mods, especially mods which change the client, are by and large written with Forge. If you visit their website, you'll be greeted abruptly by a mysterious message at the top of an SMF forum, with no clear path towards actually... making a mod. I'm documenting here the steps I went through to get started, in the hopes of helping the next person have an easier time of it.
I'll be using Scala for this guide, but it should be fairly easy to adapt these instructions to any JVM language (e.g. clojure or if you're feeling masochistic, Java). I'm also developing on OS X, so some of the commands will be a little different if you're on Linux or Windows. I'm assuming you have some proficiency with your operating system, so I won't go into details about how to adapt those commands to your system.
Background
Minecraft doesn't have an official mod API (despite early [promises](http://notch.t
First, I would google for an image that represented what I had to draw. Then ran this code in pry to
convert it into a set of x, y coordinates that should be dark:
How to take full-page screenshots with Selenium and Google Chrome in Ruby
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
Note that some vim-sexp functionality depends on <LocalLeader> mappings. This is a different leader key than the global leader, and is the variable maplocalleader (instead of mapleader). To see if you have this set, use :echo maplocalleader; if it errors out you'll need to set it, otherwise it will echo the key. If you want to set your LocalLeader to <Space>, you'll need two commands in your .vimrc, since by default <Space> is bound to <Right> in normal mode:
UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
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
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.