Skip to content

Instantly share code, notes, and snippets.

View subdesign's full-sized avatar
🎯
Focusing

Barna Szalai subdesign

🎯
Focusing
View GitHub Profile
@subdesign
subdesign / gist:2224048
Created March 28, 2012 05:52
Codeigniter pagination pagelinks settings for Twitter Bootstrap
$config['full_tag_open'] = '<div class="pagination pagination-centered"><ul>';
$config['full_tag_close'] = '</ul></div>';
$config['cur_tag_open'] = '<li class="active"><a href="#">';
$config['cur_tag_close'] = '</a></li>';
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['first_tag_open'] = '<li>';
$config['first_tag_close'] = '</li>';
$config['last_tag_open'] = '<li>';
$config['last_tag_close'] = '</li>';
@subdesign
subdesign / twbthlp
Created July 10, 2012 09:03
James Rainaldi's twitter bootstrap helper example
<?php
$this->load->helper('twitter_bootstrap');
$this->load->view('header');
echo form_open($this->uri->uri_string(),
array('class'=>'form-horizontal well',
'method'=>'post'
));
echo form_error('login');
@subdesign
subdesign / gist:5055510
Created February 28, 2013 09:35
Laracon 2013 slides
https://speakerdeck.com/kennymeyers/per-your-request
https://github.com/zackkitzmiller/laracon-slides
http://lanyrd.com/2013/laracon/sccmxz/
http://heybigname.com/laracon-presentation/#/
http://bitbucket.jonathanmarvens.com/laracon-2013-slides
https://tutsplus.com/tutorial/better-testing-in-laravel/
@subdesign
subdesign / gist:5796813
Last active December 18, 2015 14:19
Extend CI AR functions (In this case extending join() clause to handle Postgres type casting, eg. variabe::int )
-------------------------------
/application/core/MY_Loader.php
-------------------------------
<?php (defined('BASEPATH')) OR exit('No direct script access allowed');
class MY_Loader extends CI_Loader {
/**
* Database Loader
#!/bin/bash
# This script creates a new project (or site) under /var/sites and creates
# new virtual host for that site. With the options a site can also
# install the latest version of Laravel directly.
# This script was originally based on the following script by @Nek from
# Coderwall: https://coderwall.com/p/cqoplg
# Display the usage information of the command.
create-project-usage() {
@subdesign
subdesign / gist:8896788
Created February 9, 2014 09:43
Using helpers 1
...
"autoload": {
"classmap": [
"app/commands",
"app/controllers",
"app/models",
"app/database/migrations",
"app/database/seeds",
"app/tests/TestCase.php",
"app/libraries"
@subdesign
subdesign / gist:8896835
Created February 9, 2014 09:49
Helper libraries 2
<?php
class Helper {
private static function changeMonth($string, $double = FALSE)
{
if($double)
{
$month_num = array('01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12');
}
@subdesign
subdesign / gist:8896845
Created February 9, 2014 09:50
Helper 3
<?php
$date = Helper::textMonth('2014-02-09'); // 2014-02-09 ből csinál 2014 február 09-et
@subdesign
subdesign / gist:9034212
Last active August 29, 2015 13:56
faker 1
...
“require-dev”: {
“fzaninotto/faker” : “dev-master”
}
...
@subdesign
subdesign / gist:9034300
Created February 16, 2014 13:35
Faker 2
<?php
class ArticlesTableSeeder extends Seeder {
public function run()
{
// létrehoz egy Faker objektumot
$faker = Faker\Factory::create();