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
<?php | |
/** | |
* @file | |
* This is a local development configuration file. | |
*/ | |
global $conf; | |
// Turn off Secure Pages. Secure Pages Module. |
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
// INDIRECT (Turns text into a range, if that range is valid) | |
// MATCH (Returns the relative position of an item in an array that matches a specified value. The function returns the position of the value found in the lookup_array as a number.) | |
=INDIRECT("SheetName.G"&((MATCH($D2;SheetName.$A$2:$A$103;1)+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
/* | |
* Drupal 7: Using the latest EXPERIMENTAL Feeds module (7.x-2.x-dev from 2014-Dec-16) to import Commerce orders and line items the line items are not attached on each order. | |
* Technically, the database table "field_data_commerce_line_items" that keeps the reference for each order is empty | |
* and values only exist on "commerce_line_item" table. We are using Feeds to import data for "Orders" as also as "Product Line Items". | |
* With this simple function we fill up the "field_data_commerce_line_items" table from "commerce_line_item" table. | |
*/ | |
// Update line items after feeds import (so table field_data_commerce_line_items has values) | |
function MYMODULE_update_product_line_items() { | |
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
<?php | |
/** | |
* CodeIgniter String Helpers | |
* | |
* @package OpenReceptor CMS | |
* @subpackage Helpers | |
* @category Helpers | |
* @author Dimitris Krestos | |
* @link http://vdw.staytuned.gr |
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
<?php | |
$field_to_update = 'field_text_field_to_extend'; //Replace with field slug | |
$new_chars = '500'; //Replace with extended character limit | |
$result1 = db_query('ALTER TABLE {field_data_'.$field_to_update.'} CHANGE '.$field_to_update.'_value '.$field_to_update.'_value VARCHAR('.$new_chars.')'); | |
$result2 = db_query('ALTER TABLE {field_revision_'.$field_to_update.'} CHANGE '.$field_to_update.'_value '.$field_to_update.'_value VARCHAR('.$new_chars.')'); | |
$result3 = db_query('SELECT CAST(data AS CHAR(10000) CHARACTER SET utf8) data FROM {field_config} WHERE field_name = \''.$field_to_update.'\''); | |
foreach ($result3 as $result) { | |
$data = $result->data; |
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
function greeklish($string) | |
{ | |
$replace_pairs = [ | |
'Α' => 'A', | |
'Ά' => 'A', | |
'Β' => 'V', | |
'Γ' => 'G', | |
'Δ' => 'D', | |
'Ε' => 'E', |
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
// Push all (*) files from local to remote server recursively | |
rsync -rave * USER@SERVER:~/PATH_ON_REMOTE |
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
#!/bin/bash | |
# usage: drupal-quick-dump user host database D8 ("D8" is optional) | |
# remember to chmod u+x drupal-quick-dump.sh | |
BOLD="$(tput bold)" | |
RED="$(tput setaf 1)" | |
GREEN="$(tput setaf 2)" | |
MAG="$(tput setaf 5)" | |
RESET="$(tput sgr0)" | |
USER="$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
### Keybase proof | |
I hereby claim: | |
* I am theodorosploumis on github. | |
* I am theodorosploumis (https://keybase.io/theodorosploumis) on keybase. | |
* I have a public key whose fingerprint is 12F8 43E2 FE78 653C 6C93 B925 6F21 831E 78DB 885B | |
To claim this, I am signing this object: |
OlderNewer