Skip to content

Instantly share code, notes, and snippets.

View jasonevans1's full-sized avatar
:octocat:

Jason Evans jasonevans1

:octocat:
View GitHub Profile
@markshust
markshust / personal-business-coach.txt
Created January 2, 2024 20:24
ChatGPT Prompt: Personal & business coach
Please act as both a personal and business coach.
## Who am I?
My name is... (continue with extreme detail)
## Given my personal mission statement
As a _your job goes here_, ...
@jmcaldera
jmcaldera / ssh_multikeys.md
Last active February 16, 2025 18:26
Multiple SSH Keys macOS

Multiple SSH Keys on same client

Check if you have existing keys by opening the terminal and entering: ssh-add -l OR ls -al ~/.ssh and check for any file called (usually) id_rsa or similar

Identify the host you're using your current key for. You probably added this key to, for example your github or gitlab account. We will use this later on.

If you don't have a config file on ~/.ssh folder, you will need to create one. We'll get back to this later.

@DimaSoroka
DimaSoroka / performance.patch
Last active January 11, 2019 21:48
Performance improvement for Magento Patch SUPEE-6788
Index: app/code/core/Mage/Admin/Model/Variable.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- app/code/core/Mage/Admin/Model/Variable.php (revision 2bd128c1f190cd9ea63269824f09789199565251)
+++ app/code/core/Mage/Admin/Model/Variable.php (revision )
@@ -30,6 +30,13 @@
class Mage_Admin_Model_Variable extends Mage_Core_Model_Abstract
{
@tegansnyder
tegansnyder / hhvm_magento_setup.md
Last active July 14, 2023 22:30
HHVM Magento Server Setup

I've had the opertunity to try a variety of different server configurations but never really got around to trying HHVM with Magento until recently. I thought I would share a detailed walkthrough of configuring a single instance Magento server running Nginx + Fast CGI + HHVM / PHP-FPM + Redis + Percona. For the purpose of this blog post I'm assuming you are using Fedora, CentOS, or in my case RHEL 6.5.

Please note: I'm 100% open to suggestions. If you see something I did that needs to be done a different way, please let me know. I haven't included my Perconca my.conf file yet. I will shortly. Also I plan on trying this same test with HHVM 3.3 and PHP 7.

Install the EPEL, Webtatic, and REMI repos

rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
@hartleybrody
hartleybrody / Javascript Variable Scoping.md
Last active February 3, 2019 19:13
Variable scoping in Javascript can be confusing so I set out to make notes of the basic rules so that I can reference them later. Hope these are useful to others, happy to talk pull requests for corrections.

Javascript has two kinds of scope:

  1. Local (inside a function)
  2. Global (outside a function)

The var Keyword

  • Using the var keywords creates the variable in the current scope
    • If the current scope is global, then var is unnecessary (see below)
    • If the current scope is local, then you’re creating a local variable in the current scope
  • If you don’t use var, then Javascript goes up the “scope chain” to see if it’s already been declared
@timmahoney
timmahoney / Cron Starter
Last active December 25, 2015 15:49
Starter for a crontab. Copy this into your crontab in order to have a little cheat sheet for creating scheduled tasks.
[email protected]
# +------------------------- Minute of the Hour ( 0 - 59, * to run every minute )
# | +---------------------- Hour of the Day ( 0 - 23, * to run every hour )
# | | +------------------- Day of the Month ( 1 - 31, * to run every day )
# | | | +---------------- Month ( 1 - 12, * to run every month )
# | | | | +------------- Day of Week ( 0 - 7, Sunday is both 0 and 7, * to run every day )
# | | | | | +---------- User to run command as ( Defaults to the user that set up this crontab, Beware permissions! )
# | | | | | | +---- Command to Execute (
# | | | | | | |
@clochix
clochix / casperShell.js
Created October 8, 2013 09:37
Sample code to call a shell script from CasperJS
// (…)
var childProcess;
try {
childProcess = require("child_process");
} catch (e) {
this.log(e, "error");
}
if (childProcess) {
childProcess.execFile("/bin/bash", ["mycommand.sh", args1, args2, args3], null, function (err, stdout, stderr) {
this.log("execFileSTDOUT:", JSON.stringify(stdout), 'debug');
@SchumacherFM
SchumacherFM / Magento-HHVM.md
Last active May 17, 2018 18:26
Running Magento Enterprise Edition with Facebook HipHop HHVM

Running Magento Enterprise Edition with Facebook HipHop HHVM

Prerequisites

Hardware

MacBook Air (MBA) Mid 2012

@mklooss
mklooss / Product.php
Last active December 11, 2015 00:29
Magento Product Cache Loading by Johann Reinke, added "isAdmin" http://www.johannreinke.com/en/2012/04/13/magento-how-to-cache-product-loading/
<?php
/**
* @see http://www.johannreinke.com/en/2012/04/13/magento-how-to-cache-product-loading/
*/
class Namespace_Catalog_Model_Product
extends Mage_Catalog_Model_Product
{
public function load($id, $field = null)
@werdan
werdan / Amazon CloudFormation Template (AutoScaling)
Created December 24, 2012 11:31
Amazon CloudFormation Template (AutoScaling)
{
"Description" : "ProjectX scalable stack of frontal nodes",
"Parameters" : {
"InstanceType" : {
"Description" : "Type of EC2 instance to launch",
"Type" : "String",
"Default" : "m1.xlarge"
},
"SSHKeyName" : {
"Description" : "The EC2 Key Pair to allow SSH access to the instances",