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
"Just make it with Boostrap & we'll put something better behind it later" | |
How many times have you heard that? Then "later" - if it comes - means going through all of your layouts and views and changing all class names. Of course it's possible that your designer will reuse css framework class names for you, but unlikely and not at all if they are just switching to a different css framework. What to do? | |
My thought is - aliasing. I've always felt (as have others, I've seen) that css frameworks really "do things wrong" in how they force you to tightly couple your elements to their framework. It really defeats the purpose of a separate stylesheet to begin with. So, playing around a little I came up with this experiment. I'm not a designer first - my focus is on the backend stuff - so I'd really appreciate any feedback on the idea. Is this actually practicable? Does it stir the juices and give you a better idea? Please let me know! | |
------ | |
I'm using Sass, but I'm sure you can do something similar with LESS. |
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 if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class Calledin{ | |
private $ci; | |
private $messages = array( | |
0=>'Success', | |
1=>'invalid api_key', | |
2=>'no call credits', |
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
<style> | |
.scroll_checkbox { | |
border: 1px solid #CCCCCC; | |
height: 200px; | |
overflow: auto; | |
padding: 5px; | |
width: 250px; | |
} | |
</style> |
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 map_array() | |
{ | |
$names = array('Foo', 'Bar', 'Baz', 'Buzz'); | |
$tweeps = array(); | |
foreach ($names as $name) { | |
$tmp = new StdClass; | |
$tmp->name = $name; | |
$tmp->age = rand(2,7); |
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
$date = new DateTime('first Sunday'); | |
$weeksdays_array = array_map(function($val) use ($date) {return $date->add(new DateInterval('P'.$val.'D'))->format('l');}, range(0,6)); | |
var_dump($weeksdays_array); |
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
for i in `git status |grep deleted |awk '{print $3}'` ; do git rm $i; done |
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 full_languages_dropdown($id='' ) | |
{ | |
$ci = &get_instance(); | |
$ci->load->model('language_model'); | |
$common_languages = $ci->language_model->order_by('language', 'asc')->get_many_by(array('common'=>1)); | |
$languages = $ci->language_model->order_by('language', 'asc')->dropdown('id', 'language'); | |
$html = '<select id="'.$id.'" name="'.$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
// assumes you set tabIndex="0" ... last element in group | |
// set all elements in group with same class | |
// set each element with max length | |
// obviously, "phones" is not generic, easy to switch. Code I just wrote for something quick; will fix that later | |
$('.phone').keyup(function(){ | |
jumpNext($(this), $(this).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 | |
$main_object = new main_object(); | |
$main_object->main(); | |
class main_object{ | |
function main() | |
{ |
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
/* | |
Data starts in table: | |
ProjectId, key, value | |
1 totaltime 02:34:56 | |
1 zip.url http://www.mysite.com/download/file.zip | |
1 zip.size 12MB |
OlderNewer