Skip to content

Instantly share code, notes, and snippets.

View theskillwithin's full-sized avatar
😝
yay

Austin Peterson theskillwithin

😝
yay
View GitHub Profile
@werdan
werdan / Magento cron lister
Last active October 24, 2024 18:19
This script lists all Magento cronjobs in the following way: # php listAllCrons.php Job name m h dom mon dow Object::Method to execute enterprise_giftcardaccount_generage_codes_pool 30 * * * * enterprise_giftcardaccount/pool::applyCodesGeneration enterprise_logging_rotate_logs 1 2 * * * enterprise_logging/observer::rotateLogs enterprise_page_cac…
<?php
// shell/listAllCron.php
require_once 'abstract.php';
class Mage_Shell_CronLister extends Mage_Shell_Abstract
{
public function run()
{
$cronJobs = Mage::app()->getConfig()->getNode('crontab/jobs');
@barryvdh
barryvdh / .phpstorm.meta.php
Last active February 10, 2025 15:07
Laravel PhpStorm Meta file
<?php
namespace PHPSTORM_META {
/**
* PhpStorm Meta file, to provide autocomplete information for PhpStorm
* Generated on 2017-09-28.
*
* @author Barry vd. Heuvel <[email protected]>
* @see https://github.com/barryvdh/laravel-ide-helper
*/
@paulirish
paulirish / bling.js
Last active February 18, 2025 14:08
bling dot js
/* bling.js */
window.$ = document.querySelector.bind(document);
window.$$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); };
NodeList.prototype.__proto__ = Array.prototype;
NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); };
@tkadlec
tkadlec / perf.js
Created April 23, 2015 11:54
Super simple example of adding perf timing to the page display during dev work
(function () {
var perfBar = function(budget) {
window.onload = function() {
window.performance = window.performance || window.mozPerformance || window.msPerformance || window.webkitPerformance || {};
var timing = window.performance.timing,
now = new Date().getTime(),
output, loadTime;
var gulp = require('gulp'),
sass = require('gulp-sass'),
concat = require('gulp-concat'),
uglify = require('gulp-uglify'),
notify = require('gulp-notify'),
plumber = require('gulp-plumber'),
sourcemaps = require('gulp-sourcemaps'),
autoprefixer = require('gulp-autoprefixer'),
browserSync = require('browser-sync').create(),
rename = require('gulp-rename'),
@lagbox
lagbox / letsdothis.md
Last active April 27, 2016 10:43
Lets Do This

Has moved to my blog

This has been moved to my blog at asklagbox blog

Letsdothis your first quick laravel app

We are going to make a quick laravel application, including the setup and install.

We will setup the project using the following:

  • Nginx
  • sqlite3
@cointilt
cointilt / StateProvides.js
Last active April 24, 2018 02:29
State Provider for Dumb Components
import React, { Component } from 'react'
import { bool, object } from 'prop-types'
class StateProvides extends Component {
state = {
state: {},
hydrated: false,
}
@brigand
brigand / example.js
Last active February 27, 2019 06:36
React Hook 'useDebounced' for debouncing event handlers
function Foo({ onClick }) {
let handler = useDebounced(onClick, { delay: 1000, leading: true });
return <button onClick={handler}>Click me</button>;
}
@kentcdodds
kentcdodds / README.md
Last active February 6, 2025 01:55
Function syntaxes supported by TypeScript

TypeScript Function Syntaxes

I'm trying to create examples of all the different ways to write functions and function type definitions in TypeScript.

One requirement is these examples must work with strict mode (noImplicitAny, etc) enabled.

If I'm missing anything, please add comments below with examples. I'll eventually put this into a blog post.