Are you trying to sync de-normalized data from a remote source (e.g. webservice)
and struggle importing it into your nicely normalized database?
Maybe this little demo might give you an idea!
| /** | |
| * Basic LessCSS Build System for Sublime Text 2 | |
| * | |
| * Prerequisites: node.js, global lesscss node module | |
| * How it works: | |
| * 1. Create the folders "src/css" and "assets/css" in your project root | |
| * 2. Put all your .less files into "src/css" | |
| * 3. Open your main .less file and hit "Build" | |
| * 4. Dance happily around your minified and compiled CSS file in "assets/css" | |
| * 5. Profit |
| if (! function_exists('nav_link')) | |
| { | |
| /** | |
| * Helper function for creating and highlighting Twitter Bootstrap Nav-Links | |
| * david.wosnitza // 2012-05-10 13:05:34 | |
| * | |
| * @param string $uri The URI you want to Navigate to | |
| * @param string $title Your Link text | |
| * @param boolean $home Activation override: Highlights on if URI is empty | |
| * @param integer $level Choose the URI segment to comare to |
| <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
| class MicroACL { | |
| private $CI; | |
| private $is_loaded = false; | |
| private $my_role = null; | |
| private $my_perms = array(); | |
| javascript:(function(){var links=document.querySelectorAll('a.l'),count=links.length;while(count--){links[count].onmousedown=null;if((/url=/i).test(links[count].href)){links[count].href=decodeURIComponent(links[count].href.match(/url=([a-z0-9\-+%._]+)&/i)[1].replace(/\+/g, ' '));}};})() |
| <?php // my view ?> | |
| <h1><?php echo $album_info['0']['album_name'] ?></h1> | |
| <a href="/photos/<?php echo $album_info['0']['album_year'] ?>" title="Back to Albums">Back to Albums</a> | |
| <ul class="photo-items"> | |
| <?php foreach($album_photos as $k => $v) {$album_photos[$k] = (object) $v;} ?> | |
| <?php $album_presenter->partial('list_photos'); ?> |
| //**** PREQUISITES | |
| //** bchunk | |
| // > MacOS: | |
| // $ brew install bchunk | |
| // > Good Linux Distros: | |
| // $ sudo apt-get install bchunk | |
| //**** The script: |
| <div id="editor_area"> | |
| <span>Inhalt:</span><br> | |
| <textarea id="ta_news_text" name="news_text"></textarea> | |
| <div id="editor_preview"></div> | |
| </div> | |
| <script defer src="markitup/jquery.markitup.js"></script> | |
| <script defer src="markitup/sets/markdown/set.js"></script> | |
| <script defer src="markitup/parsers/showdown.js"></script> |
| <?php | |
| echo implode("\n",array_map(function($l){return implode("\n", array_merge($l,(array)(implode('| ', array_map(function($t){return sprintf("%-7.7s | %-6.5s " , $t[0] , $t[1]);}, array_fill(0, 5, array('HEX', 'Char')))))));},array_chunk(explode("\n", implode("\n",array_merge((array)(implode('| ', array_map(function($t){return sprintf("%-7.7s | %-6.5s " , $t[0] , $t[1]);}, array_fill(0, 5, array('HEX', 'Char'))))), array_map(function($s){ return sprintf( rtrim(str_repeat("0x%-5.5s | \U%-5.5s | ", floor(80/strlen(sprintf(" %-5.5s | %-5.5s ", ' ', ' ')))), '| '), $s[0],$s[0],$s[1],$s[1],$s[2],$s[2],$s[3],$s[3],$s[4],$s[4]);}, array_chunk( array_map(function($c){return strtoupper(dechex($c));}, range(0x1F300, 0x1F5FF)) ,5))))), 25))); |
| ### Keybase proof | |
| I hereby claim: | |
| * I am druu on github. | |
| * I am druu (https://keybase.io/druu) on keybase. | |
| * I have a public key whose fingerprint is EF7B 2FE7 8E3D 3D58 3032 50A3 517C 6DDC D655 93D3 | |
| To claim this, I am signing this object: |