Skip to content

Instantly share code, notes, and snippets.

<cache>
<slow_backend>database</slow_backend>
<fast_backend>memcached</fast_backend>
<fast_backend_options>
<servers>
<server>
<host>unix:///tmp/memcached.sock</host>
<port>0</port>
@reidblomquist
reidblomquist / gist:aa9df1581a7ee8c82910
Last active August 19, 2021 14:41
Force cancel orders in Magento
The following SQL queries should set an orders status to canceled:
UPDATE sales_flat_order SET state = 'canceled', status = 'canceled' WHERE increment_id IN (order#1,order#2,etc);
UPDATE sales_flat_order_grid SET status = 'canceled' WHERE increment_id IN (order#1,order#2,etc);
@reidblomquist
reidblomquist / gist:b02ffcef8449f87ff5dc
Created June 10, 2014 19:25
Magento user agent regex XML from magento/app/code/core/Mage/Core/etc/system.xml
<ua_regexp translate="comment">
<label></label>
<frontend_model>adminhtml/system_config_form_field_regexceptions</frontend_model>
<backend_model>adminhtml/system_config_backend_design_exception</backend_model>
<sort_order>2</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<comment>Match expressions in the same order as displayed in the configuration.</comment>
</ua_regexp>
@reidblomquist
reidblomquist / gist:8daada8044e8adb9491e
Created June 10, 2014 20:05
Pull a Magento attribute's available options (in this case 'style_tag')
<?php
/* Ryaan is totes a newb */
error_reporting(E_ALL);
ini_set('display_errors', '1');
require_once('../magento/app/Mage.php');
Mage::app();
$attribute = Mage::getSingleton('eav/config')->getAttribute('catalog_product', 'style_tag');
if ($attribute->usesSource()) {
@reidblomquist
reidblomquist / gist:568484bf122132b5c6a1
Created July 31, 2014 01:59
get parent id arrays - check if config or grouped
if($product->getTypeId() == "simple"){
$parentIds = Mage::getModel('catalog/product_type_grouped')->getParentIdsByChild($product->getId());
if(!$parentIds)
$parentIds = Mage::getModel('catalog/product_type_configurable')->getParentIdsByChild($product->getId());
if(isset($parentIds[0])){
$parent = Mage::getModel('catalog/product')->load($parentIds[0]);
// do stuff here
}
}
@reidblomquist
reidblomquist / gist:fdb80d5647881bcab4df
Last active September 23, 2015 17:18
gitignore for dir w/ unity project subdir
# Unity Generated
Temp
Library
# vs/mono Generated
ExportedObj
obj
*.svd
*.userprefs
@reidblomquist
reidblomquist / Loader.cs
Created June 22, 2015 05:55
Loader and SoundManager scripts referenced in TextTyper class
using UnityEngine;
using System.Collections;
public class Loader : MonoBehaviour {
public GameObject gameManager;
public GameObject soundManager;
void Awake () {
if (gameManager && GameManager.instance == null)
@reidblomquist
reidblomquist / gist:45033dd6bf81ea3b658e
Created June 26, 2015 05:36
Unity3d UI Raw Image Video
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class GuiVideo : MonoBehaviour {
void Start() {
MovieTexture movie = GetComponent<RawImage>().texture as MovieTexture;
AudioSource sound = GetComponent<AudioSource>();
sound.clip = movie.audioClip;
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Faddah's Life</title>
<meta name="description" content="Faddah's Life">
<meta name="author" content="Faddah">

KC60 Keyboard end-user tips, tricks, programming notes, etc.

Leimi's note: removed lots of stuff from the original gist of scottjl, (thanks to him by the way!), as in the end some wasn't useful for me. If you are intestered, go check the gist revisions.

The KC60 is kinda like a premade GH60 that was first sold on Massdrop during summer 2015.
It runs on TMK firmware, or something based on it at least (not sure this is the real source for the keyboard but it seems it is), which means it's heavily programmable.
There is a GUI tool (the source of this tool seems to be here) and a command-line tool to ease up the process of programming the board.
**Go check this great article on Key