start new:
tmux
start new with session name:
tmux new -s myname
| // run from the index page of the course | |
| (function () { | |
| var urls = [], | |
| videos = []; | |
| // get lesson urls | |
| $('.lesson-index__lesson-link').each( function () { | |
| urls.push( $(this).attr('href') ); |
| function scaleImage(ev) | |
| { | |
| var data = ev.data, | |
| editor = ev.editor; | |
| var img = data.image; | |
| // maximum size allowed for images | |
| var maxX = 400; | |
| var maxY = 300; |
| // in User.php model add few checks | |
| public function is_admin() | |
| { | |
| return ($this->account_type === 'admin'); // account_type is ENUM field | |
| } | |
| public function has_rights($acc_type) | |
| { | |
| if ($this->is_admin()) { // if admin always true | |
| return true; |
| <?php | |
| // filter je upit koji zavisi od toga sta je popunjeno u pretrazi | |
| $filter = array('relation' => 'AND'); | |
| // zavisno sta je od polja poslato u upitu kreiramo upit: | |
| if ( ! empty($_GET['tip'])) { // ako pretrazujes po tipu nekretnine | |
| $filter[] = array( | |
| 'key' => 'tip', // ovo je ime custom polja, recimo da je 'tip' |
| function parse_git_dirty { | |
| [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit, working directory clean" ]] && echo "*" | |
| } | |
| parse_git_branch() { | |
| git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
| } | |
| if [ "$color_prompt" = yes ]; then | |
| PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\] $(parse_git_branch)\[\033[00m\]\$ ' |
| <script type="text/javascript"> | |
| (function () { | |
| "use strict"; | |
| // once cached, the css file is stored on the client forever unless | |
| // the URL below is changed. Any change will invalidate the cache | |
| var css_href = './index_files/web-fonts.css'; | |
| // a simple event handler wrapper | |
| function on(el, ev, callback) { | |
| if (el.addEventListener) { | |
| el.addEventListener(ev, callback, false); |
| /* | |
| * An Angular service which helps with creating recursive directives. | |
| * @author Mark Lagendijk | |
| * @license MIT | |
| */ | |
| angular.module('foo').factory('RecursionHelper', ['$compile', function($compile){ | |
| return { | |
| /** | |
| * Manually compiles the element, fixing the recursion loop. | |
| * @param element |
| // ... | |
| add_filter('body_class','iii_inject_category_classs'); | |
| // add post's categories as css classes to <body> (with cat- prefix added) | |
| function iii_inject_category_classs($classes) { | |
| global $post; | |
| if ($post and is_single($post)) { | |
| foreach((get_the_category($post->ID)) as $cat) { |
| /** | |
| * Usage (where #map is ID of some element in svg document): | |
| * $('#map').addSVGClass('some-class'); | |
| * $('#map').removeSVGClass('some-other-class'); | |
| */ | |
| (function ($) { | |
| $.fn.addSVGClass = function(className) { | |
| var re = new RegExp('\\b'+ className +'\\b'); | |
| return this.each( function() { |