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
; 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") |
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
#! /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 | |
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
# 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" |
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
// ==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"); |
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
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| |
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 Elo | |
def initialize | |
puts "hhi" | |
end | |
def wowz &func | |
puts "wow" | |
@func = func | |
end | |
def zorb |
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
// w js nie ma switcha z regexem :-( |
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
var el = $("<div />"); | |
el.innerHTML = cos_Tam_z_Ajax; | |
console.log(el.find('p')); |
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
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| |