Skip to content

Instantly share code, notes, and snippets.

View kernelp4nic's full-sized avatar

Sebastián Moreno kernelp4nic

  • Prisma Campaigns
  • Montevideo-Uruguay
View GitHub Profile

Simplistic Full-Text Search With Redis's Sorted Sets

Howto

git clone git://gist.github.com/923934.git redisearch

cd redisearch
//The Amplituhedron TM®
//By nikoclass@gmail.com
#ifdef GL_ES
precision highp float;
#endif
// Uniform es constante mientras corre el shader
uniform float time;
@kernelp4nic
kernelp4nic / Clojure learning
Last active August 29, 2015 14:01
Clojure learning
.
@kernelp4nic
kernelp4nic / musicforprogramming.py
Last active August 29, 2015 14:04
wget music for programming
#!/usr/bin/python
# brew install python
# pip install feedparser
import feedparser
from subprocess import call
feed = feedparser.parse('http://musicforprogramming.net/rss.php')
@kernelp4nic
kernelp4nic / http_test.lua
Created July 21, 2014 19:29
luanode http/https connection (luanode http_test.lua secure)
local net = require "luanode.net"
local host = "userstream.twitter.com"
local secure = process.argv[1] == "secure"
if secure then
console.log("Using secure connection (HTTPS)")
local c = net.createConnection(443, host)
c:on("connect", function()
@kernelp4nic
kernelp4nic / title-case.clj
Created May 12, 2015 17:29
title case word clojure
(defn- title-case-word [w]
(if (zero? (count w))
w
(str (Character/toTitleCase (first w))
(subs w 1))))
/*
* Copyright (C) 2014 Jared Rummler <jared.rummler@gmail.com>
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
[
{
"button": "button1",
"count": 1,
"modifiers": ["super"],
"press_command": "drag_select",
"command": "goto_definition"
}
]
@kernelp4nic
kernelp4nic / user.keymap
Last active August 29, 2015 14:22
lighttable-user-behaviors.clj
;; User behaviors
;; -----------------------------
;; Behaviors are stored as a set of diffs that are merged together
;; to create the final set of functionality that makes up Light Table. You can
;; modify these diffs to either add or subtract functionality.
;;
;; Behaviors are added to tags, objects with those tags then automatically gain
;; whatever logic the behavior imparts. To see a list of user-level behaviors,
;; start typing a word related to the functionality you want in between the square
;; brackets (e.g. "theme").
@kernelp4nic
kernelp4nic / .ctags
Created July 29, 2015 17:16
ctags for clojure
--langdef=Clojure
--langmap=Clojure:.clj.cljs.cljx
--regex-clojure=/\([ \t]*create-ns[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/n,namespace/
--regex-clojure=/\([ \t]*def[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/d,definition/
--regex-clojure=/\([ \t]*defn[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/f,function/
--regex-clojure=/\([ \t]*defn-[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/p,private function/
--regex-clojure=/\([ \t]*defmacro[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/m,macro/
--regex-clojure=/\([ \t]*definline[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/i,inline/
--regex-clojure=/\([ \t]*defmulti[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/a,multimethod definition/
--regex-clojure=/\([ \t]*defmethod[ \t]+([-[:alnum:]*+!_:\/.?]+)/\1/b,multimethod instance/