- go to developer.paypal.com
- login with your paypal login
- click on Applications in the nav bar
- click on Sandbox Accounts in the sidebar
- click the Create Account button
- fill in the form
- done! Go to sandbox.paypal.com and login to see your admin, view transactions, etc.
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
<project name="Einstein2" default="build" basedir="."> | |
<property name="basedir" value="${project.basedir}" /> | |
<property name="source" value="${basedir}/app"/> | |
<property name="php_bin_path" value="" /> | |
<target name="clean" description="Clean up and create artifact directories"> | |
<delete dir="${basedir}/build/api"/> | |
<delete dir="${basedir}/build/code-browser"/> | |
<delete dir="${basedir}/build/coverage"/> | |
<delete dir="${basedir}/build/logs"/> |
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
# search and replace with backup | |
# with -i it specifies a backup. So the file will be copied from myfile.txt to myfile.txt.bak before replacing any text. | |
# the * at the end is the filename. It can be myfile.* or *.txt or * or myfile.txt or whatever. | |
# mac version | |
sed -i .bak 's/hello/gbye/g' * | |
# linux version | |
sed -ibak 's/hello/gbye/g' * | |
# or just | |
sed 's/hello/gbye/g' * |
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 | |
/** | |
* CSV file seeder. put the csv in the same dir named like table_name.csv. Then | |
* set the tableName property. The run command picks up from there. | |
* | |
* @copyright MIT | |
*/ | |
namespace InternetBrands\AutoClassifiedsPlatform\Common\Seeds; |
Pros | Cons |
---|---|
👍 Makes large views readable as to what they contain | 👎 If you want to change text and it's all in one view, just ctrl-f for it and change the text. If it's in sub-views, you first have to find which view fragment it resides in before you change it. The frustration of this IMHO outweighs the simplicity of knowing what's going on in the master view |
👍 Allows you to reuse sections of code with different parameters (this is only helpful if you plan on reusing the abstracted code) | 👎 When you abstract segments that are only being used in one place, it adds unnecessary complexity and processing requirements. |
👎 Dealing with an extra closing div is a nightmare. Now you have to go through each @included file and find the extra . | |
👎 Indentation adjustment is a pain in the ass because you have to match child file indentation to be one more than the parent |
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
#! /bin/bash | |
if [[ ! -f "/my/file/whatever/cron.disabled" ]] | |
/usr/bin/php /var/www/sites/staging/live/artisan cron:run | |
fi |
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 | |
$offset = 0; | |
// only process 1000 at a time | |
$increment = 1000; | |
// getByOffsetAndLimit is the key factor here! | |
while ($galleries = $this->listingGalleryRepository->getByOffsetAndLimit($offset, $increment)) { | |
// we have to break out of the loop if there are no more left |
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 | |
// ... | |
public function processData($input) | |
{ | |
if (is_array($input)) { | |
// if it's an array, loop through each one and recursively | |
// call the function we're in but this time without an | |
// array. So it should skip past this line for each one. |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
- jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
- Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
- AngularJS - Conventions based MVC framework for HTML5 apps.
- Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
- lawnchair - Key/value store adapter for indexdb, localStorage
OlderNewer