Skip to content

Instantly share code, notes, and snippets.

View yitsushi's full-sized avatar
🏳️‍⚧️

Victoria Nadasdi yitsushi

🏳️‍⚧️
View GitHub Profile
.valami_class {
font-size: 12px;
width: 100px;
height: 100px;
background-image: url("../images/blog/type_text.png"); }
.valami_mas_class {
color: #aa0000;
width: 150px;
height: auto; }
@yitsushi
yitsushi / gem_istall_mysql2.output
Created April 15, 2011 10:13
ruby-192 + mysql-51 + windows7_64bit
C:\DevKit>gem install mysql2 -- '--with-mysql-lib="c:\Program Files\MySQL\MySQL
Server 5.1\lib\opt" --with-mysql-include="c:\Program Files\MySQL\MySQL Server 5.
1\include"'
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing mysql2:
ERROR: Failed to build gem native extension.
C:/Ruby192/bin/ruby.exe extconf.rb --with-mysql-lib="c:\Program Files\MySQL\MySQ
L Server 5.1\lib\opt" --with-mysql-include="c:\Program Files\MySQL\MySQL Server
# ([ 3, 2, 1, 3, 1, 2, 3 ] * (1000/7)).each { |s| (($x||=0) > 997) ? break : $y = ($y||=0) + ( $x += s ) }
([ 3, 2, 1, 3, 1, 2, 3 ] * (1000/14)).each { |s| (($x||=0) > 997) ? break : $y = ($y||=0) + ( $x += s ) }
@yitsushi
yitsushi / wsYouTube.php
Created February 2, 2011 08:49
test lib
<?php
namespace wsTestLib;
require LIB.'/wsYouTube.php';
class wsYouTube {
var $name = 'YouTube processor';
public function sunrise() {
$this->videos = array(
'available' => array(
@yitsushi
yitsushi / variable.php
Created January 12, 2011 14:51
Valtozo ami jo hosszu szoveget tartalmaz =/
<?php
$a = 12;
$b = <<<EOV
fasza cucc {$a} ami erteke \$a.
EOV;
echo $b;
class A
def initialize(parent)
@parent = parent
end
def test
puts "A::test"
end
end
class A
def test
puts "A::test"
end
end
class B
def test
puts "B::test"
C.a.test
@yitsushi
yitsushi / mongomapper_integer_size_limit.rb
Created October 22, 2010 23:48
[demo] Vaidator for size of an integer
class TestCucc
include MongoMapper::Document
key :cucc, Integer
validates_true_for :cucc,
:logic => lambda { | x | x.cucc >= 1 && x.cucc <= 5 },
:message => "must be in the following range: 1 to 5"
end
=begin
ruby-1.9.2-p0 > load "t.rb"
@yitsushi
yitsushi / poem.rb
Created October 14, 2010 14:22
Program of the true Love
# Title
feelings = {:happy => 1, :suicide => 0}
supernaturals = { }
begin
# begining
me = i = Person.new
you = Angel.new
i.love you if you.love? me
def gen_log_base(base)
return Proc.new { |num| Math.log(num, base) }
end
log2 = gen_log_base(2)
log10 = gen_log_base(10)
puts log2.call(4)
puts log10.call(100)