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/env bash | |
| RED='\033[0;31m' | |
| LIGHTRED='\033[1;31m' | |
| NC='\033[0m' | |
| GREEN='\033[0;32m' | |
| CURRENTUSER=$USER; | |
| PURPLE='\033[0;35m' | |
| BLUE='\033[0;34m' |
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 | |
| /** | |
| * Implements hook_rules_action_info(). | |
| */ | |
| function services_auth_apikeys_rules_action_info() { | |
| return array( | |
| 'services_auth_apikeys_rules_action_generate_token_api_key' => array( | |
| 'label' => t('Generate token and api key on account creation'), | |
| 'group' => t('Services Auth Api Keys'), |
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
| // Load the list of time zone in mysql after this login to your mysql | |
| mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p --force mysql | |
| // By default your mysql time zone is set to SYSTEM | |
| // But what if you want to change your global and session time zone? | |
| (set global and session time zone) | |
| SET @@global.time_zone = 'Asia/Manila' | |
| SET @@session.time_zone = 'Asia/Manila' |
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
| #!/bin/bash | |
| ### USAGE | |
| ### | |
| ### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
| ### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
| ### | |
| ### CLI options Contributed by @janpieper | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
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
| function email_client() { | |
| $late = array(); | |
| $schedules = views_get_view_result('employee_schedule', 'page_2'); | |
| $check_sched = views_get_view_result('attendance_checker', 'page'); | |
| $schedule_emp = array(); | |
| foreach($schedules as $schedule) { | |
| $schedule_emp[] = array( | |
| 'uid' => $schedule->_field_data['nid']['entity']->field_assign_user['und'][0]['uid'], | |
| 'emp_name' => $schedule->_field_data['nid']['entity']->title, | |
| 'schedule' => $schedule->_field_data['nid']['entity']->field_schedule['und'], |
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
| function theme_inventory_form($variables) { | |
| $form = $variables['form']; | |
| $limit = 10; | |
| $output = ""; | |
| drupal_add_js('misc/tableselect.js'); | |
| $header = array( | |
| array('data' => t(' ')), | |
| array('data' => t('SKU')), |
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
| function inventory_form($form, &$form_state) { | |
| global $user; | |
| $limit = 10; | |
| module_load_include('module', 'profile2', 'contrib/profile2_page'); | |
| $profile = profile2_by_uid_load($user->uid, 'employee'); | |
| $store = node_load($profile->field_store_branch['und'][0]['target_id']); | |
| $inventory = node_load($store->field_inventory['und'][0]['target_id']); | |
| $header = 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
| #!/bin/bash | |
| clear | |
| echo "Downloading basic module for development..." | |
| # Download all modules that are needed | |
| drush dl admin_menu | |
| drush dl module_filter | |
| drush dl pathauto | |
| drush dl ckeditor |