Skip to content

Instantly share code, notes, and snippets.

space::send, {space}
Function(key)
{
if (GetKeyState("ctrl", "P") and GetKeyState("shift", "P"))
{
sendinput, ^+%key%
}
else if (GetKeyState("ctrl", "P") and GetKeyState("alt", "P"))
{

Magento Code Snippets

Download extension manually using mage

./mage config-set preferred_state stable
./mage clear-cache
./mage sync
./mage download community Module_Name
@altercation
altercation / browser.sh
Created November 1, 2016 19:17
Per workspace browser launcher
#!/usr/bin/env zsh
setopt EXTENDED_GLOB NO_UNSET
unsetopt NO_MATCH
# launch different browser profiles automatically on any named i3 workspace
# plain numbered workspaces (or those listed in DEFAULT_WS) launch the normal
# browser profile
# expected names for chromium/google-chrome executable
#browsers=(chromium google-chrome google-chrome-${^=:-stable unstable beta dev})
@Seldaek
Seldaek / ext-requires.txt
Last active February 15, 2020 18:52
PHP Extension Requirements on Packagist.org
Taken from packagist.org
Packages with a master branch update since June 1st 2018: 98977
Of those, package having requires on PHP extensions: 11676 (11.79%)
As only ~12% of packages declare their extension requirements,
and even then it might not be a complete list, take all this with
a big grain of salt, it is informative but definitely not a
complete picture of the most used extensions.
@mhedges1
mhedges1 / SeedResource.php
Last active June 5, 2020 02:50
Quickly build boilerplate for your Laravel 5.1 application's resources. Builds a Model, Migration, Controller, FormRequests, Commands, and Events in one expression. Simply place this file into App/Console/Commands/ and add " \App\Console\Commands\Resource\SeedResource::class" to your $commands array in App\Console\Kernel.php
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
/**
* Class SeedResource
* @package App\Console\Commands\Resource
*/
@greneholt
greneholt / AutoHotkey.ahk
Last active September 14, 2020 20:35
AutoHotkey semicolon arrow keys and capslock to ctrl/escape
#SingleInstance force
; Necessary for semicolon arrow to work, since it can send semicolon.
#InstallKeybdHook
; Better performance.
SendMode Input
; Kill CapsLock.
SetCapsLockState AlwaysOff
@linkdd
linkdd / hackernews-new-comms.js
Last active September 20, 2021 22:52
Add a bell emoji to unread comments on HackerNews
// Can be used with https://github.com/xcv58/Custom-JavaScript-for-Websites-2
// This snippet is released under the terms of the CC0 license: https://creativecommons.org/publicdomain/zero/1.0/deed.en
const cache_key = 'hn_comments_views'
const cache = JSON.parse(localStorage.getItem(cache_key) || '{}')
document.querySelectorAll('.athing.comtr').forEach(comm => {
if (!cache[comm.id]) {
const span = document.createElement('span')
span.innerHTML = '&#x1f514;' // :bell: emoji
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
(proto (if no-ssl "http" "https")))
(when no-ssl
(warn "\
Your version of Emacs does not support SSL connections,
which is unsafe because it allows man-in-the-middle attacks.
There are two things you can do about this warning:
1. Install an Emacs version that does support SSL and be safe.
@gwillem
gwillem / magento-nginx.conf
Last active July 29, 2023 10:13
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
@kaushikgopal
kaushikgopal / karabiner.edn
Last active October 13, 2023 21:15
My source Karabiner file in Goku's edn format - Now lives @ https://github.com/kaushikgopal/dotfiles/blob/master/.karabiner.edn
;; File has moved over to https://github.com/kaushikgopal/dotfiles/blob/master/.karabiner.edn
;; Feel free to raise github issues in that repo, if you have questions/comments/edits