This file contains hidden or 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
SET foreign_key_checks = 0; | |
TRUNCATE `core_cache_option`; | |
TRUNCATE `core_cache_tag`; | |
TRUNCATE `core_session`; | |
TRUNCATE `dataflow_batch_export`; | |
TRUNCATE `dataflow_batch_import`; | |
TRUNCATE `enterprise_logging_event`; | |
TRUNCATE `enterprise_logging_event_changes`; | |
TRUNCATE `enterprise_support_backup`; | |
TRUNCATE `enterprise_support_backup_item`; |
This file contains hidden or 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
<?php | |
/** | |
* Upgrade script based on https://gist.github.com/colinmollenhour/2715268 | |
* Set global/skip_process_modules_updates to '1' in app/etc/local.xml | |
* | |
* Execute script to trigger upgrades and cache refresh | |
*/ | |
require_once 'abstract.php'; |
This file contains hidden or 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
upstream sendybackend { | |
server unix:/var/run/php-fcgi-sendy.sock; | |
} | |
server{ | |
listen {server_ip}:80; | |
server_name sendy.{domain}; | |
autoindex off; |
This file contains hidden or 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
#!/usr/bin/php | |
<?php | |
/** | |
* Fake mail sending: log content to file | |
* | |
* Instructions: | |
* 1. Save as /usr/sbin/sendmail | |
* 2. Make it executable | |
*/ |
This file contains hidden or 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
<?php | |
/** | |
* Using PHP syntax, partition the array A into two arrays B and C in a way that that the difference between the | |
* sum of elements in B and the sum of elements in C is minimized. | |
* | |
* @author Stjepan Udovičić ([email protected]) | |
*/ | |
/** Predefined array */ | |
$A = array( |
This file contains hidden or 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
/* Test IBAN values: | |
HR 15 2340 0093 2109 5545 7 | |
HR 5023400093102278840 | |
*/ | |
#include <iostream> | |
#include <string> | |
#include <algorithm> // needed for remove_if | |
using namespace std; |
NewerOlder