Skip to content

Instantly share code, notes, and snippets.

View arielallon's full-sized avatar
🙊

Ariel Allon arielallon

🙊
View GitHub Profile
@arielallon
arielallon / get_metadata.sh
Created January 18, 2022 16:34 — forked from rlcarrca/get_metadata.sh
RETS server connectivity via curl
curl \
--digest \
--user-agent "MyCurlClient/1.0" \
-o data/metadata.xml \
--show-error \
--dump-header data/headers.txt \
-u "username:password" \
--header "RETS-Version: RETS/1.5" \
--cookie-jar data/cookies.txt \
--cookie data/cookies.txt \
from scapy.all import *
import requests
import time
MAGIC_FORM_URL = 'http://put-your-url-here'
def record_poop():
data = {
"Timestamp": time.strftime("%Y-%m-%d %H:%M"),
"Measurement": 'Poopy Diaper'
}
<?php
$installer = Mage::getResourceModel('catalog/setup', 'catalog_setup');
if (!$installer->getAttributeId(Mage_Catalog_Model_Product::ENTITY, 'attribute_name')) {
$installer->addAttribute(Mage_Catalog_Model_Product::ENTITY, 'attribute_name', array( // TABLE.COLUMN: DESCRIPTION:
'label' => 'Label', // eav_attribute.frontend_label admin input label
'group' => 'General', // (not a column) tab in product edit screen
'sort_order' => 0 // eav_entity_attribute.sort_order sort order in group
'backend' => 'module/class_name', // eav_attribute.backend_model backend class
@arielallon
arielallon / 0_reuse_code.js
Created December 10, 2013 21:31
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console