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 ApplicationController < ActionController::Base | |
def current_user | |
User.find(session[:user_id]) | |
end | |
end |
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
interface="sis0" | |
primary_ip="94.23.4.157" | |
secondary_ip="87.98.236.112" | |
machine_ips="{" $primary_ip $secondary_ip "}" | |
table <bad_hosts> | |
block in log all |
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
@current_user ||= User.find(session[:user_id]) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="author" content="Paweł Lenart" /><meta name="keywords" content="HTML, CSS, JavaScript, PHP, MySQL, PostgreSQL, Ruby, Rails" /> | |
<title class="exceptional">Programmer</title> | |
</head> | |
<body> | |
Here's my <a href="mailto:pawel@lenart.pl">email</a>. | |
You can also call me on <span class="mobile">+48 664 134 697</a>. | |
</body> |
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
pawel@plenart-pc:~$ vim -v | |
Error detected while processing /home/pawel/.vimrc: | |
line 1: | |
E319: Sorry, the command is not available in this version: syntax enable | |
Error detected while processing /home/pawel/.vim/colors/solarized.vim: | |
line 286: | |
E319: Sorry, the command is not available in this version: let colors_name = "solarized" | |
line 395: | |
E319: Sorry, the command is not available in this version: let s:none = "NONE" | |
line 396: |
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 CommentsController < ApplicationController | |
before_filter :load_project | |
before_filter :assign_user | |
def create | |
@comment = @project.comments.new(params[:comment]) | |
if @comment.save | |
redirect_to @project, :notice => 'Comment has been added' | |
else | |
redirect_to @project, :alert => 'Unable to add a comment' |
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
function createUploader(){ | |
var uploader = new qq.FileUploader({ | |
element: document.getElementById('file-uploader'), | |
action: '../include/upload/upload.php', | |
debug: false, | |
onSubmit: function() { | |
$("#su_name, #su_company, #su_project, #su_email").css('border', '0'); | |
if ($("#su_name").val() == "" || |
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
<?php | |
/** | |
* Eurotax Valuation Webservice Handler | |
* | |
* This class allows connecting to Eurotax Webservice, fetching dictionary data | |
* and request vehicle valuation. | |
* | |
* Usage example: | |
* <code> | |
* <?php |
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
<?php | |
require_once SITE_PATH . 'inc/lib/DatabaseDriver.class.php'; | |
abstract class BaseModel extends DatabaseDriver implements ArrayAccess { | |
protected $tablename = null; | |
private $schema; | |
private $attributes = array(); | |
private $is_new = true; |
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
<?php | |
require_once SITE_PATH . 'inc/lib/DatabaseDriver.class.php'; | |
abstract class BaseModel extends DatabaseDriver implements ArrayAccess, Iterator { | |
protected $tablename = null; | |
private $schema; | |
protected $attributes = array(); | |
private $is_new = true; |
OlderNewer