Skip to content

Instantly share code, notes, and snippets.

codecov:
token: uuid # Your private repository token
url: "http" # for Codecov Enterprise customers
slug: "owner/repo" # for Codecov Enterprise customers
branch: master # override the default branch
bot: username # set user whom will be the consumer of oauth requests
ci: # Custom CI domains if Codecov does not identify them automatically
- ci.domain.com
- !provider # ignore these providers when checking if CI passed
# ex. You may test on Travis, Circle, and AppVeyor, but only need
@rapzo
rapzo / destructuring.js
Created February 23, 2016 12:25 — forked from mikaelbr/destructuring.js
Several demos and usages for ES6 destructuring.
// === Arrays
var [a, b] = [1, 2];
console.log(a, b);
//=> 1 2
// Use from functions, only select from pattern
var foo = () => {
return [1, 2, 3];
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh
// Functions to help figure out whether elements are in the viewport
// and lazy-load their content if so.
// Implemented as jQuery plugins.
(function() {
$.fn.inView = function(nearThreshold) {
var $elem = $(this);
// Checks if its visible, CSS-wise
if (!$elem.is(":visible")) {
return false;
@rapzo
rapzo / Base.php
Last active December 17, 2015 08:59 — forked from nateabele/Base.php
<?php
namespace my_app\models;
use MongoId;
use lithium\data\collection\DocumentSet;
use lithium\data\entity\Document;
use lithium\util\Inflector;
use lithium\core\Libraries;
use lithium\util\Set;
<?php
namespace app\tests\cases\controllers;
use app\tests\mocks\MockArticlesController;
use app\tests\mocks\action\MockControllerRequest as Request; //Mocking the Request
class ArticlesControllerTest extends \lithium\test\Unit {
protected $_controller;
@rapzo
rapzo / media.php
Created March 19, 2012 19:13 — forked from nateabele/media.php
An example of how to completely reconfigure Lithium's templating engine
<?php
use lithium\net\http\Media;
/**
* This re-maps your template paths so you can have stuff like `pages/users_{username}.php`
* instead of the Lithium default.
*/
Media::type('html', 'text/html', array(
'view' => 'lithium\template\View',