Skip to content

Instantly share code, notes, and snippets.

View the-nerdery-dot-info's full-sized avatar

Michael Morrissey the-nerdery-dot-info

View GitHub Profile
@the-nerdery-dot-info
the-nerdery-dot-info / threaded_ue.cpp
Created October 29, 2016 21:42
how to accomplish cpu multithreading in unreal engine
UCLASS(config=Game)
class AMultiThreadingCharacter : public ACharacter
{
GENERATED_BODY()
/** Camera boom positioning the camera behind the character */
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
class USpringArmComponent* CameraBoom;
/** Follow camera */
@the-nerdery-dot-info
the-nerdery-dot-info / mic_input_ue4.cpp
Created October 29, 2016 00:24
Unreal Engine 4 Mic Input Snippet from quoteunquotestudio.com
// Additional includes:
#include "Voice.h"
#include "OnlineSubsystemUtils.h"
// New class member:
TSharedPtr<class IVoiceCapture> voiceCapture;
// Initialisation:
voiceCapture = FVoiceModule::Get().CreateVoiceCapture();
voiceCapture->Start();
@the-nerdery-dot-info
the-nerdery-dot-info / .vimrc
Last active August 5, 2017 00:22
My VIM RC File
" call plug#begin()
" Make sure you use single quotes
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
"VIM customizations
" General Config {
@the-nerdery-dot-info
the-nerdery-dot-info / cleanup.php
Created June 23, 2016 09:45 — forked from Zifius/cleanup.php
Shell script to remove unassigned simple products
<?php
/**
* This script is used to clean up unassigned simple products
*
* @author Alexander Turiak <[email protected]>
* @copyright Copyright (c) 2014 HexBrain (http://www.hexbrain.com)
*/
require_once 'abstract.php';
@the-nerdery-dot-info
the-nerdery-dot-info / usefulmagento.sql
Last active June 22, 2016 11:51
useful magento 1.9.x sql statements
#this selects configurable products that don't have any simple products associated with them
select entity_id from `catalog_product_entity` where 'type_id' = 'configurable' AND entity_id NOT IN (SELECT DISTINCT parent_id FROM catalog_product_super_link);
#this selects simple products not associated with a configurable one
select entity_id, sku from catalog_product_entity where type_id = 'simple' AND entity_id NOT IN (SELECT DISTINCT product_id FROM catalog_product_super_link);
sudo chown -R ubuntu:www-data install-dir
sudo find . -type f -exec chmod 640 {} \;
sudo find . -type d -exec chmod 750 {} \;
sudo find var/ -type f -exec chmod 660 {} \;
sudo find media/ -type f -exec chmod 660 {} \;
sudo find var/ -type d -exec chmod 770 {} \;
sudo find media/ -type d -exec chmod 770 {} \;
@the-nerdery-dot-info
the-nerdery-dot-info / gist:7af44a4ba622368fbb817d842fda57dc
Created June 13, 2016 23:15 — forked from g3d/gist:2709563
Clean Install – OS X 10.11 El Capitan
<block type="cms/block" name="block_name">
<action method="setBlockId"><id>block_code</id></action>
</block>
{{block type="cms/block" block_id="block_code"}}
{{block type="catalog/product_list" category_id="79" template="catalog/product/list_random.phtml"}}
@the-nerdery-dot-info
the-nerdery-dot-info / create_configurable_snippet.php
Created May 16, 2016 01:48
Magento Script to create configurable products
Mage::app()->setCurrentStore(Mage_Core_Model_App::ADMIN_STORE_ID);
$productArr = [];
$tmpFilename = $_FILES["docname"]["tmp_name"];
$csv = new Varien_File_Csv();
$data = $csv->getData($tmpFilename);
$skuArr = array();
foreach ($data as $value) {
$skuArr[] = $value[0];
$attributeColorCode = 'color';
@the-nerdery-dot-info
the-nerdery-dot-info / README.md
Created April 27, 2016 04:24 — forked from denji/README.md
Remove WebStorm; PhpStorm; PyCharm; RubyMine; AppCode; CLion, IntelliJ; 0xDBE10 settings and CLI-Links from Mac OSX

Quick uninstall JetBrains settings:

curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s