Skip to content

Instantly share code, notes, and snippets.

@ottosch
ottosch / fork-helper.py
Last active January 18, 2023 22:06
A script to help using ymgve's bitcoin_fork_claimer script
#!/usr/bin/env python
# This script is meant to be used with bitcoin_fork_claimer: https://github.com/ymgve/bitcoin_fork_claimer
# The outputs of this script are the inputs to that script.
# Python 2.x is required
import urllib2
import json
import sys
import collections
@taniarascia
taniarascia / php-pdo-mysql-crud.md
Created May 4, 2017 15:40 — forked from odan/php-pdo-mysql-crud.md
Basic CRUD operations with PDO and MySQL

Basic CRUD operations with PDO

CRUD = Create, Read, Update, Delete

Open a database connection

$host = '127.0.0.1';
$dbname = 'test';
$username = 'root';
@darkogoles1
darkogoles1 / Magento2 JS notes (from Alan Storm blog).md
Last active December 21, 2022 07:13
Magento 2 Javascript notes (credit to Alan Storm http://alanstorm.com/category/magento-2/)

###RequireJs Modules

  • RequireJs module needs to be defined inside: Your_Module/view/frontend/web/module.js path

  • Simple RequireJs module definition can look like this:

http://collabshot.com/show/A65S78

@Bhavdip
Bhavdip / sketch-never-ending.md
Created October 6, 2016 15:53
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@odan
odan / xampp_php7_xdebug.md
Last active February 25, 2025 20:49
Installing Xdebug for XAMPP
@CMCDragonkai
CMCDragonkai / bash_interactive_and_login.sh
Last active August 5, 2023 09:54
Bash & ZSH: Interactive and Login Shells
#!/usr/bin/env bash
[[ $- == *i* ]] && echo "This Bash Shell is Interactive Shell" || echo "This Bash Shell is Not a Interactive Shell"
shopt -q login_shell && echo "This Bash Shell is a Login Shell" || echo "This Bash Shell is Not a Login Shell"
@jreinke
jreinke / disable_flat_catalog_category.php
Last active November 13, 2024 13:23
Magento: Disable flat catalog category on the fly
<?php
/** @var $collection Mage_Catalog_Model_Resource_Category_Collection */
$collection = Mage::getModel('catalog/category', array('disable_flat' => true))->getCollection();
// ... custom stuff
@parhamr
parhamr / opcache.ini
Last active March 14, 2016 23:15
Known working Zend OPcache configuration for PHP 5.5
; configuration for php ZendOpcache module
; Tuned for Magento 1.13.1 on PHP 5.5
; Test server has 8 CPU cores and 32 GB RAM
zend_extension=opcache.so
[opcache]
opcache.memory_consumption=256
opcache.interned_strings_buffer=12
opcache.max_accelerated_files=16000
opcache.enable_file_override=1
@SchumacherFM
SchumacherFM / pt-duplicate-key-checker.sql
Last active February 5, 2023 15:10
pt-duplicate-key-checker for Magento 1.8 MySQL database. Less indexes the faster the update/insert statement
# ########################################################################
# api2_acl_attribute
# ########################################################################
# IDX_API2_ACL_ATTRIBUTE_USER_TYPE is a left-prefix of UNQ_API2_ACL_ATTRIBUTE_USER_TYPE_RESOURCE_ID_OPERATION
# Key definitions:
# KEY `IDX_API2_ACL_ATTRIBUTE_USER_TYPE` (`user_type`)
# UNIQUE KEY `UNQ_API2_ACL_ATTRIBUTE_USER_TYPE_RESOURCE_ID_OPERATION` (`user_type`,`resource_id`,`operation`),
# Column types:
# `user_type` varchar(20) not null comment 'type of user'
@grafikchaos
grafikchaos / gist:9938618
Last active July 22, 2016 14:38 — forked from petemcw/gist:1169053
Magento Snippets

Magento Snippets

Add Attribute Group and Attributes to Attribute Sets

In an install script, you can follow the below example:

<?php
/**
 * Pan_JewelryDesigner Extension