View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View magento-db-cleanup.sql
SET FOREIGN_KEY_CHECKS=0;
-- Customers
TRUNCATE `customer_entity`;
TRUNCATE `customer_entity_datetime`;
TRUNCATE `customer_entity_decimal`;
TRUNCATE `customer_entity_int`;
TRUNCATE `customer_entity_text`;
TRUNCATE `customer_entity_varchar`;
View bitrix_debug.php
Bitrix\Main\Diag\Debug::writeToFile(array('ID' => $id, 'fields'=>$fields ),"","/debug.txt");
Bitrix\Main\Diag\Debug::dumpToFile(array('ID' => $id, 'fields'=>$fields ),"","/debug.txt");
// source: http://pilezkiy.com/blog/bitrix-debug-methods/
View gist:c9577ff3e1b415da0a8e254dc3a8064e
class YourTask extends AsyncTask {
...
@Override
protected void onPostExecute(Boolean result) {
handler.sendEmptyMessage(0);
}
}
Handler handler = new Handler() {
@Override
View BOI-Kitchen-sink.html
<h1>Headings</h1>
<span style="display:block; margin:10px 0; border-bottom: 3px solid #ddd"></span>
<h1>h1. This is 1st level heading</h1>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, numquam, quam porro sint repellendus voluptate consequuntur necessitatibus quidem! Ullam quis rerum excepturi odio similique facilis. Recusandae accusantium, dolorem maxime ipsum.</p>
<h2>h2. This is 2nd level heading</h2>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, numquam, quam porro sint repellendus voluptate consequuntur necessitatibus quidem! Ullam quis rerum excepturi odio similique facilis. Recusandae accusantium, dolorem maxime ipsum.</p>
<h3>h3. This is 3rd level heading</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Possimus, numquam, quam porro sint repellendus voluptate consequuntur necessitatibus quidem! Ullam quis rerum excepturi odio similique facilis. Recusandae accusantium, dolorem maxime ipsum.</p>
<h4>h4. This is 4th level heading</h4>
<p>
View query.json
{
"transportType": {
"code": "car"
},
"status": "in_progress",
"originComment": null,
"jobReference": "2016-07-25-16834",
"id": 289147,
"destinationComment": null,
"currentDelivery": {
View US Airways-Ticketed purchase in advance
Enter file contents here-AIG clear on landing 32, Flaps down and rutter use, pedels for brake and taxi. RVSM.
View query.json
{
"transportType": {
"code": "cargobike"
},
"status": "expired",
"originComment": null,
"jobReference": "Franprix ecommerce 2016-07-25-16833",
"id": 289182,
"destinationComment": null,
"currentDelivery": null,
View gist:bfd2b6ce3ff663e0a9ac522b731bc7da
function arrayOfLight(x) {
var array = [];
for (var i = 0; i <= x; i++) {
array.push(i);
}
return array
}
alert(arrayOfLight(20));
View DynamicImageMap.java
import org.apache.wicket.ajax.AjaxEventBehavior;
import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.ajax.IAjaxCallDecorator;
import org.apache.wicket.ajax.calldecorator.CancelEventIfNoAjaxDecorator;
import org.apache.wicket.markup.ComponentTag;
import org.apache.wicket.markup.html.WebMarkupContainer;
import org.apache.wicket.markup.repeater.Item;
import org.apache.wicket.markup.repeater.RefreshingView;
import org.apache.wicket.markup.repeater.util.ModelIteratorAdapter;