Skip to content

Instantly share code, notes, and snippets.

View kissarat's full-sized avatar
🏠
Working from home

Taras Labiak kissarat

🏠
Working from home
View GitHub Profile
@kissarat
kissarat / Repository-Johnny.cs
Created April 20, 2012 10:37
Repository pattern implementation
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Johnny.Models;
using Johnny;
using System.Data.Entity;
using System.Data;
using System.Data.Entity.Infrastructure;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Johnny.Models;
using System.Data.Entity;
namespace Johnny.Data
{
public class ArticleData : Repository<Article>
<input type="hidden" value="<%= id %>" />
<div class="leftSide">
<fb:profile-pic uid="<%= author_id %>" size="square" facebook-logo="false" linked="true"></fb:profile-pic>
</div>
<div class="rightSide">
<div class="nickNameContainer"><fb:name uid="<%= author_id %>" use-you="no"></fb:name></div>
<div style="float: right; cursor: pointer;">
<% if (approved==1) { %>
<button class="voteButton" onclick="vote(<%= id %>)">LubiД™ to!</button>
<% } else { %>
<!DOCTYPE html>
<html lang="uk">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="uk-UA" />
<meta name="Document-State" content="Static" />
<meta name="Keywords" content="документ,стаття" />
<meta name="URL" content="absolute_url" />
<title>Приклад статті</title>
<link rel="stylesheet" type="text/css" href='1.css' />
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Access-Control-Allow-Origin" content="*" />
<title>Untitled Page</title>
<style type="text/css">
fieldset div
{
padding: 2px;
}
prices = document.getElementsByClassName('preis');
for(i in prices) {
var price = prices[i];
price.innerText = 'ab ' + Math.round(
parseInt(
price.innerText.substring(3)
)*0.8) + ',-€';
}
prices = document.getElementsByClassName('preis');
function loadLibrary(url) {
script = document.createElement('script');
script.setAttribute('type', 'text/javascript');
script.setAttribute('src', url);
document.head.appendChild(script);
}
function loadLibraryByName(name) {
switch(name) {
case 'underscope':
<!DOCTYPE html>
<html>
<head>
<title>Приклад</title>
</head>
<body>
<?php
echo "Текст виведений PHP";
?>
</body>
var Meta = function() {}
NodeList.prototype.is = function(predicate) {
var result = [];
for(var i=0; i<this.length; i++) {
var node = this.item(i);
if (predicate.call(node))
result.push(node);
}
return result;
@kissarat
kissarat / price-converter.user.js
Last active December 15, 2015 09:08
for last-minute.de rough copy
// ==UserScript==
// @name PriceConverter
// @author Тарас Лабяк
// @namespace Alim
// @version 1.0
// @description Збільшує ціни на 20% (ціни діляться на 0.8)
// @encoding utf-8
// ==/UserScript==
// atch http://*last-minute.de/
// atch http://*traveltainment.de/