Skip to content

Instantly share code, notes, and snippets.

/**
* Created with JetBrains WebStorm.
* User: ynonperek
* Date: 8/21/12
* Time: 9:36 AM
* To change this template use File | Settings | File Templates.
*/
(function() {
var Score = function() {
this.value = 0;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Cool Web Site</title>
<meta name="viewport" content="width=device-width" />
<style>
label {
min-width: 100px;
display: inline-block;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Ultimate War</title>
</head>
<body>
<h1>Score</h1>
<div id="score"></div>
@ynonp
ynonp / app.js
Created August 28, 2012 12:17
webstagram
/**
* Created with JetBrains WebStorm.
* User: ynonperek
* Date: 8/28/12
* Time: 2:38 PM
* To change this template use File | Settings | File Templates.
*/
(function() {
use v5.14;
my %couples = (
Yehuda => 'Ninet',
Yossi => 'Jager',
Bibi => 'Sarah',
Brad => 'Jeffiner',
);
$couples{Brad} = 'Angelina';
@ynonp
ynonp / game.js
Created September 2, 2012 21:30
Red Spotter Game Example using Object Oriented JavaScript
/**
* Created with JetBrains WebStorm.
* User: ynonperek
* Date: 9/2/12
* Time: 3:01 PM
* To change this template use File | Settings | File Templates.
*/
(function() {
@ynonp
ynonp / data.pl
Created September 4, 2012 08:02
Advanced Perl day1
use v5.14;
use warnings;
use Data::Dumper;
my $people = [];
sub add_new_person {
my ( $name, $work, $tagline ) = @_;
push $people, {
name => $name,
@ynonp
ynonp / Anagrams.pm
Created September 6, 2012 07:09
Zombie games
package Anagram;
use Moose;
use v5.14;
# has means data member
has 'word', required => 1, is => 'ro', isa => 'Str';
has 'normalized_word', lazy_build => 1, is => 'ro';
# my means static
my @dictionary_words;
@ynonp
ynonp / slider.html
Created September 9, 2012 10:44
Slider
<!DOCTYPE html>
<html>
<head>
<title>Transitions Demo</title>
<style>
body { overflow:hidden; border:0; margin:0;}
#container {
width:200%;
}
@ynonp
ynonp / files.pl
Created September 9, 2012 14:43
Print files by length
use v5.14;
my %files = map { length($_) => $_ } glob('*');
my $count = shift;
foreach my $length (sort {$a <=> $b} keys %files) {
say $files{$length};
--$count or last;
}