Skip to content

Instantly share code, notes, and snippets.

View milansimek's full-sized avatar

Milan Simek milansimek

View GitHub Profile
//The default sizes are for a bicycle with a 35mm diameter round frame, standard bicycle seat, 1/4-20 hardware (1 inch long for the middle bolt and 2.5 inch long for the 2 side bolts) with nylock nuts.
//More information at https://www.thingiverse.com/thing:4370283
/* [ Rendering settings ] */
//Which piece should be displayed? Note that the online Customizer will generate each piece individually as well as an .stl that includes all 3 pieces regardless of which view you select below.
part="All"; // [Top:Top Only,Middle:Middle Only,Bottom:Bottom Only,All:View All Three]
/* [General dimensions] */
//Width of all 3 adapter pieces.
width=75;
@milansimek
milansimek / footer.phtml
Created March 29, 2018 23:59
Disclaimer product pdf
@milansimek
milansimek / RetrieveSubmissions.php
Last active March 21, 2018 15:09
Loop through contact form submissions
<?php
require_once('app/Mage.php');
umask(0);
Mage::app();
$submissions = Mage::getModel('plugincompany_contactforms/entry')->getCollection();
$submissions
->addFieldToFilter('form_id', 1) //example parent form id filter
->addFieldToFilter('created_at', ['gt' => '2017-10-15']) //example submission date filter
@milansimek
milansimek / dbash
Last active June 29, 2023 18:54
Docker quick bash shell in running container. Allows you to type 'dbash container_name' to directly enter bash in container
#!/bin/bash
#Place this file in the following folder:
#/usr/local/bin/
# now run `dbash container_name` to enter bash shell in container
# or `dbash [tab][tab]` to use the autocomplete functionality
docker exec -t -i $1 env TERM=xterm bash
@milansimek
milansimek / Magento batch installer
Created February 11, 2015 21:20
Magento batch installer + automatic git adding script for testing. As featured here: https://plugin.company/blog/batch-installing-magento-1-4-1-9-custom-module/
#!/bin/bash
#user data
DBUSER=yourusername #add your mysql user name here
DBPASSW=yourpassword #add your mysql password here
URL='http://test.dev/' #your local www-data URL
GITBASEURL='git@gitlab.com:magento-extensions/' #the 'root' url of your git provider / project group
#end user data
INST=$1