Skip to content

Instantly share code, notes, and snippets.

Avatar

styks1987

  • Frontier Label
  • Greenville, SC
View GitHub Profile
View callbackawait.jsx
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();
View gist:092a7c42ff0b2c3f9fed634bbdb0e527
this.loggerStream.on('data', message => {
if (message[Symbol.for('level')] == 'error') {
} else {
this.setState(update(this.state, {log: {$push: [[message.message]]}}));
}
});
View gist:e29f719c542f2ee9536f3c3bdaad7688
const net = require('net');
export default () => {
return new Promise(resolve => {
const server = net.createServer();
server.listen(() => {
console.log('callback');
});
console.log(server.address().port);
View ArchiveToStatic.md

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
View gist:a9339a9bb8f02a338919ab1a5ccd7818
[!] 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/
View frontier_analytics.md

First Order Count BY Month (change to stat_user_last_cart for last)

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,
View bootstrap.php
<?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 () {
@styks1987
styks1987 / SoundBar
Last active Jan 10, 2021
Remote Codes Vizio TV and Vizio Sound Bar
View SoundBar
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
View select_options.php
<?php
$start = new \DateTime();
$end = clone($start);
$end->add(new \DateInterval('P3M'));
$interval = new \DateInterval('P1M');
$months = new \DatePeriod($start, $end, $interval);
$options = [];
View simple_slider.js
ready(function(){
/**
* Discover any fancy slideshows that exist on the page
*/
function fancySlideshows () {
this.discover = function () {
var slideshows = document.querySelectorAll('.fancy-slideshow');
if (slideshows.length > 0 ){
slideshows.forEach(function(s){