This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// get the last order | |
$lastOrderId = $this->_getOnepage()->getCheckout()->getLastOrderId(); | |
$order = Mage::getModel('sales/order')->load($lastOrderId); | |
// Add the comment and save the order (last parameter will determine if comment will be sent to customer) | |
$order->addStatusHistoryComment('This comment is programatically added to last order in this Magento setup'); | |
$order->save(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
header("Cache-Control: no-cache, no-store, must-revalidate"); // HTTP 1.1. | |
header("Pragma: no-cache"); // HTTP 1.0. | |
header("Expires: 0"); // Proxies. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOCK TABLES `admin_role` WRITE , `admin_user` WRITE; | |
SET @SALT = "rp"; | |
SET @PASS = CONCAT(MD5( CONCAT(@SALT, "super_secure_password") ), CONCAT(":", @SALT)); | |
SELECT @EXTRA := MAX(extra) FROM admin_user WHERE extra IS NOT NULL; | |
INSERT INTO `admin_user` (firstname, lastname, email, username, password, created, lognum, reload_acl_flag, is_active, extra, rp_token_created_at) | |
VALUES ('FirstName', 'LastName', '[email protected]', 'your_username', @PASS,NOW(), 0, 0, 1, @EXTRA,NOW()); | |
INSERT INTO `admin_role` (parent_id, tree_level, sort_order, role_type, user_id, role_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ALTER TABLE `sequence_creditmemo_1` AUTO_INCREMENT=33000 | |
ALTER TABLE `sequence_invoice_1` AUTO_INCREMENT=33000 | |
ALTER TABLE `sequence_order_1` AUTO_INCREMENT=33000 | |
ALTER TABLE `sequence_shipment_1` AUTO_INCREMENT=33000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Web3 = require('web3'); | |
var solc = require('solc'); | |
var fs = require('fs'); | |
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); | |
//replace this with whatever is your local user address | |
var userAddress = '0x143a7c5eb8cf1c4f72460b8d29d686b3399bb0f9'; | |
var compiledCode = solc.compile(fs.readFileSync('Miles.sol').toString()); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.4.18; | |
contract Miles { | |
uint8 public miles; | |
function Voting() public { | |
miles = 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"retainer_hours": X, | |
"currency": "eur", | |
"bank": "ca", | |
"price_per_hour": N, | |
"net_payment": "Valuta: 30 dana od dana izdavanja fakture. / Terms: please pay within 30 days of receiving this invoice.", | |
"additional_billable_items": { | |
"Usluge održavanja servera za period od jednog meseca. / Hosting services for period of one month.": 50, | |
"CDN isporuka resursa na sajtu. / CDN delivery of website resources.": 20, | |
"Optimizacija slika na serveru. / Server-side image optimization.": 40 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import sys | |
import urllib3 | |
from bs4 import BeautifulSoup | |
# Examples how to run this script: | |
# python3 company_no.py jumpking | |
# python3 company_no.py coca_cola | |
def main(): |