Skip to content

Instantly share code, notes, and snippets.

View flexd's full-sized avatar

Kristoffer Berdal flexd

  • Oslo, Norway
  • 17:29 (UTC +02:00)
View GitHub Profile
@flexd
flexd / antialias.js
Created September 16, 2011 15:54
Quick jQuery hack to enable CSS anti-aliasing while keeping the CSS validating.
$("body").css("-webkit-font-smoothing", "antialiased");
"Gitt ; Under hensyntagen til ; I lys av ; Vedrørende ; Grunnet ; I betraktning av ; Forutsatt ; Med utgangspunkt i ; I forhold til ; Sett hen til ; I henhold til ; Med tanke på ; Uavhengig av ; Sett på bakgrunn av ; Sammenholdt med ; På grunn av ; Med hensyn til ; Under forutsetning av ; Etter en totalvurdering av ; Uten hensyn til ; Avhengig av ; På grunnlag av ; I og med ; Under henvisning til::en integrert ; en optimal ; en sømløs ; en implisitt ; en proaktiv ; en betydelig ; en økt ; en vesentlig ; en ikke ubetydelig ; en kostnadseffektiv ; en avtagende ; en vedvarende ; en tiltagende ; en gjeldende ; en helhetlig ; en manglende ; en særlig ; en løpende ; en langsiktig ; en bærekraftig ; en resultatorientert ; en tverrfaglig ; en kommunikativ ; en inkluderende::målsetting ; effekt ; struktur ; agenda ; tidshorisont ; overveielse ; mobilitet ; treffsikkerhet ; innsats ; kvalitetssikring ; problematikk ; ressursbruk ; avveining ; avklaring ; implementering ; styringsinnsats ; innovasjon ; effektivisering ;
require "cinch/storage"
require "redis"
require "redis/objects"
require "redis/hash_key"
module Cinch
class Storage
class Redis < Storage
def initialize(options, plugin)
# New Redis object, thread safe by default since 2.2.0
kristoffer@dev:~/code/cinch$ ruby -I ./lib/ examples/plugins/memo.rb
/home/kristoffer/code/cinch/lib/cinch/storage/redis.rb:9:in `initialize': wrong number of arguments (1 for 2) (ArgumentError)
from /home/kristoffer/code/cinch/lib/cinch/storage/redis.rb:11:in `new'
from /home/kristoffer/code/cinch/lib/cinch/storage/redis.rb:11:in `initialize'
from /home/kristoffer/code/cinch/lib/cinch/plugin.rb:378:in `new'
from /home/kristoffer/code/cinch/lib/cinch/plugin.rb:378:in `initialize'
from examples/plugins/memo.rb:16:in `initialize'
from /home/kristoffer/code/cinch/lib/cinch/plugin_list.rb:11:in `new'
from /home/kristoffer/code/cinch/lib/cinch/plugin_list.rb:11:in `register_plugin'
from /home/kristoffer/code/cinch/lib/cinch/plugin_list.rb:16:in `block in register_plugins'
[17868] 13 Dec 20:18:19 - Accepted 127.0.0.1:59466
[17868] 13 Dec 20:18:22 - DB 0: 1 keys (0 volatile) in 4 slots HT.
[17868] 13 Dec 20:18:22 - 1 clients connected (0 slaves), 726264 bytes in use
# encoding: utf-8
require 'redis'
require 'redis/hash_key'
$redis = Redis.new
@hash = Redis::HashKey.new('Memo')
@hash[:memos]['dominikh'] = "Some text"
@hash['b'] = 2
@hash.each do |k,v|
puts "#{k} = #{v}"
end
require "cinch/storage"
require "redis"
module Cinch
class Storage
class Redis < Storage
def initialize(options, plugin)
# New Redis object, thread safe by default since 2.2.0
@redis = Redis.new
@options = options
#
# weechat.conf -- weechat v0.3.0
#
[debug]
[startup]
command_after_plugins = ""
command_before_plugins = ""
display_logo = on
require "cinch/storage"
require "redis"
require "json"
module Cinch
class Storage
class Redis < Storage
def initialize(options, plugin)
# New Redis object, thread safe by default since 2.2.0
@redis = ::Redis.new(:host => 'localhost', :port => 6379)
require "cinch/storage"
require "redis"
require "json"
module Cinch
class Storage
class Redis < Storage
def initialize(options, plugin)
# New Redis object, thread safe by default since 2.2.0
@redis = ::Redis.new(:host => 'localhost', :port => 6379)