select count(id) first_cart_count,
SUM(order_count) first_order_count,
QUARTER(created) quarter_segment,
MONTH(created) month_segment,
YEAR(created) year_segment,
SUM(subtotal) subtotal,
SUM(total) total,
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
VOLUME UP: | |
One line: FFA25D:NEC:32 | |
uint16_t rawData[67] = {8980,4486, 544,572, 542,574, 542,572, 542,574, 542,572, 544,572, 542,572, 544,578, 542,1654, 542,1654, 542,1652, 544,1654, 542,1652, 542,1652, 544,1652, 542,1636, 564,1652, 544,572, 544,1652, 542,550, 566,572, 544,572, 542,1652, 542,578, 542,572, 544,1652, 542,572, 542,1654, 542,1652, 544,1652, 544,572, 542,1654, 542}; // NEC FFA25D | |
uint32_t address = 0x0; | |
uint32_t command = 0x45; | |
uint64_t data = 0xFFA25D; | |
VOLUME DOWN: | |
One line: FF827D:NEC:32 | |
uint16_t rawData[67] = {8980,4486, 542,572, 544,572, 544,546, 568,572, 544,572, 542,572, 542,572, 544,556, 564,1652, 544,1654, 542,1654, 542,1652, 544,1652, 542,1652, 544,1652, 544,1658, 542,1652, 544,572, 542,572, 544,572, 616,498, 544,572, 544,1654, 542,578, 542,574, 542,1652, 544,1654, 542,1654, 542,1652, 542,1652, 544,572, 544,1634, 564}; // NEC FF827D |
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 | |
class BusinessDayPeriodIterator implements \Iterator | |
{ | |
private $current; | |
private $period = []; | |
public function __construct(\DatePeriod $period) { | |
$this->period = $period; | |
$this->current = $this->period->getStartDate(); | |
if(!$period->include_start_date){ |
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
handleClick1 = async () => { | |
await this._commonStateUpdate({foo: {$set: 1}}); | |
// This function requires the new value of foo in the state | |
this.doSomethingElse(); | |
} | |
handleClick2 = async () => { | |
await this._commonStateUpdate({foo: {$set: 2}}); | |
// This function requires the new value of foo in the state | |
this.doSomethingElse(); |
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
this.loggerStream.on('data', message => { | |
if (message[Symbol.for('level')] == 'error') { | |
} else { | |
this.setState(update(this.state, {log: {$push: [[message.message]]}})); | |
} | |
}); |
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
const net = require('net'); | |
export default () => { | |
return new Promise(resolve => { | |
const server = net.createServer(); | |
server.listen(() => { | |
console.log('callback'); | |
}); | |
console.log(server.address().port); |
Download the site
- --adjust-extension - Changes the file to be .css or .html
- -m - Mirror
- --no-host-directories - Normally this would put the downloaded files into a subfolder of the hostname. This prevents that
- -k - make links in downloaded HTML or CSS point to local files
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
[!] Title: Visual Composer <= 4.7.3 - Multiple Unspecified Cross-Site Scripting (XSS) | |
Reference: https://wpvulndb.com/vulnerabilities/8208 | |
Reference: http://codecanyon.net/item/visual-composer-page-builder-for-wordpress/242431 | |
Reference: https://forums.envato.com/t/visual-composer-security-vulnerability-fix/10494/7 | |
[i] Fixed in: 4.7.4 | |
[!] Title: WordPress Slider Revolution Local File Disclosure | |
Reference: https://wpvulndb.com/vulnerabilities/7540 | |
Reference: http://blog.sucuri.net/2014/09/slider-revolution-plugin-critical-vulnerability-being-exploited.html | |
Reference: http://packetstormsecurity.com/files/129761/ |
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 | |
// Special logs for email tracking | |
Log::setConfig('emails', function () { | |
$log = new Logger('emails'); | |
$log->pushHandler(new LogglyHandler('XXXX/tag/emails', Logger::INFO)); | |
return $log; | |
}); | |
Log::setConfig('jobs', function () { |
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 | |
$start = new \DateTime(); | |
$end = clone($start); | |
$end->add(new \DateInterval('P3M')); | |
$interval = new \DateInterval('P1M'); | |
$months = new \DatePeriod($start, $end, $interval); | |
$options = []; |
NewerOlder