Skip to content

Instantly share code, notes, and snippets.

View lukaszkorecki's full-sized avatar
🌴
🛹

Łukasz Korecki lukaszkorecki

🌴
🛹
View GitHub Profile
; Color theme support is required.
(require 'color-theme)
; Code start.
(defun color-theme-bespin ()
(interactive)
(color-theme-install
'(color-theme-bespin
((background-color . "#28211C")
(foreground-color . "#BAAE9E")
#! /bin/bash
curl -v -H'Accept: application/json' -H'X-Blip-api: 0.02' -u foo:s0p3l -F "update[body]=elo-pld" http://api.blip.pl/updates
We couldn’t find that file to show.
# Works on: ruby 1.8.7 (2008-08-11 patchlevel 72) [i686-darwin9.8.0] (installed using rvm)
# Fails on: ruby 1.8.7 (2010-01-10 patchlevel 249) [i686-darwin9] (installed using macports)
def caller &block
block.call
end
class Base
def method_missing meth
puts "#{meth} called on Base"
// ==UserScript==
// @name CampfireAvatars
// @namespace http://*campfirenow.com
// @description Inserts avatars of your homies
// @author Lukasz Korecki
// @include *.campfirenow.com/room*
// ==/userscript==
function add_avatars() {
// console.log("addind avatars");
desc "Check the JavaScript source with JSLint - exit with status 1 if any of the files fail."
task :jslint do
jsl_path = "jsl" # get jsl bin from http://javascriptlint.com
failed_files = []
Dir['public/**/*.js'].reject{|path| path =~ /javascripts.js/ }.each do |fname|
cmd = "#{jsl_path} -nologo -nocontext -nofilelisting -process #{fname} | grep err"
results = %x{#{cmd}}
puts "#{fname} | " << results
results.gsub("(s)","").split(",").each do |result|
class Elo
def initialize
puts "hhi"
end
def wowz &func
puts "wow"
@func = func
end
def zorb
// w js nie ma switcha z regexem :-(
var el = $("<div />");
el.innerHTML = cos_Tam_z_Ajax;
console.log(el.find('p'));
num = ARGV[0].to_i
x = num
y = num - 2
grid = Array.new(y) { Array.new(x, '*')}
required_spiral_depth = x / 4 + 1
(1..required_spiral_depth*2).step(2) do |spiral_depth|
(spiral_depth..y-spiral_depth).each do |i|