-
Install this VSCode Extension https://marketplace.visualstudio.com/items?itemName=be5invis.vscode-custom-css
-
Create a CSS in a place like so ~/Users/you/vscode.css
-
Paste the lines of file below
-
Go to Settings to change some settings like so:
"editor.fontLigatures": true, "editor.fontFamily": "Operator Mono", "editor.fontSize": 13, "vscode_custom_css.imports": [ "file:///Users/rafael/vscode.css"
This file contains hidden or 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 | |
| $str = 'This is an image: google.ca/images/srpr/logo3w.png<br> | |
| YouTube: http://www.youtube.com/watch?v=V2b8ilapFrI&feature=related <br> | |
| Stackoverflow: http://stackoverflow.com/'; | |
| function converterLinksEmVideos($arr){ | |
| if(strpos($arr[0], 'http://') !== 0){ |
This file contains hidden or 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 | |
| $count = $model->countAll(); | |
| $pages = new Paginator; | |
| $pages->items_total = $count; | |
| $pages->mid_range = 9; | |
| $pages->paginate(); | |
| $options['limit'] = $pages->low.', '.($pages->high + 1); | |
This file contains hidden or 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 | |
| //ref: http://cubiq.org/the-perfect-php-clean-url-generator | |
| setlocale(LC_ALL, 'en_US.UTF8'); | |
| function toAscii($str, $replace=array(), $delimiter='-') { | |
| if( !empty($replace) ) { | |
| $str = str_replace((array)$replace, ' ', $str); | |
| } | |
| $clean = iconv('UTF-8', 'ASCII//TRANSLIT', $str); |
This file contains hidden or 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
| $conditions = array( | |
| 'conditions' => array('codigo' => '24150'), | |
| 'contain' => array( | |
| 'Card'=>array( | |
| 'Partner' => array ( | |
| 'Contact' => array( | |
| 'conditions' => array('Contact.coords_lat' => '38.710930') | |
| ) | |
| ) | |
| ) |
This file contains hidden or 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 | |
| function nicetime($date){ | |
| if(empty($date)) { | |
| return "No date provided"; | |
| } | |
| $periods = array("second", "minute", "hour", "day", "week", "month", "year", "decade"); | |
| $lengths = array("60","60","24","7","4.35","12","10"); | |
| $now = time(); |
This file contains hidden or 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
| */15 * * * * sh /home/rafael/projects/deployment/deploy-projects |
This file contains hidden or 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 | |
| function next_prev_portfolio($post, $current_term){ | |
| //echo '<pre>'; | |
| $postlist_args = array( | |
| 'posts_per_page' => -1, | |
| //'orderby' => 'menu_order title', | |
| //'order' => 'ASC', | |
| 'post_type' => 'portfolio', | |
| 'portfolio_category' => $current_term | |
| ); |
This file contains hidden or 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
| // bling.js | |
| var $ = window.$ = document.querySelector.bind(document); | |
| var $$ = window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { | |
| this.addEventListener(name, fn); | |
| } | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = NodeList.prototype.addEventListener = (function(name, fn) { | |
| this.forEach(function(elem) { | |
| elem.on(name, fn); |
This file contains hidden or 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
| // @flow | |
| import React, { Component } from 'react' | |
| import { BrowserRouter, Route, Switch } from 'react-router-dom' | |
| import asyncComponent from './asyncComponent' | |
| const MyAwesomePage = asyncComponent(() => import('./MyAwesomePage')) | |
| /** | |
| * Main Component, displays App Shell UI, setup routes which are dynamically loaded | |
| */ |