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 | |
echo -n "Tag Name: " | |
read -e TAG | |
git tag $TAG | |
git push origin --tags |
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
/*********************************************************** | |
helper function for rest api | |
for more info on how to use this function... see: | |
https://gist.github.com/gregmercer/6465411 | |
***********************************************************/ | |
function rest_helper($url, $params = null, $verb = 'GET', $format = 'json', $authorization = null) { |
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 for fetching the rest login token | |
example of use: | |
$response = rest_login(); | |
$instance_url = $response->instance_url; | |
$access_token = $response->access_token; | |
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 strtohex($string) | |
{ | |
$string = str_split($string); | |
foreach($string as &$char) | |
$char = "\x".dechex(ord($char)); | |
return implode('',$string); | |
} |
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
@media screen { | |
%icon { | |
transition: background-color ease .2s; | |
margin: 0 .5em; | |
} | |
} | |
@mixin icon($color, $url) { | |
@extend %icon; | |
background-color: $color; |
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
SELECT DISTINCT node.nid AS nid | |
FROM | |
node node | |
INNER JOIN field_data_field_academic_area_unlimited field_data_field_academic_area_unlimited ON node.nid = field_data_field_academic_area_unlimited.entity_id AND (field_data_field_academic_area_unlimited.entity_type = 'node' AND field_data_field_academic_area_unlimited.deleted = '0') | |
INNER JOIN field_data_field_region_of_interest field_data_field_region_of_interest ON node.nid = field_data_field_region_of_interest.entity_id AND (field_data_field_region_of_interest.entity_type = 'node' AND field_data_field_region_of_interest.deleted = '0') | |
WHERE (( (node.status = '1') AND (node.type IN ('announcement')) )AND( (field_data_field_academic_area_unlimited.field_academic_area_unlimited_tid = '10001') OR (field_data_field_region_of_interest.field_region_of_interest_tid = '26551') )) |
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
/** | |
* Implements hook_views_pre_execute(). | |
*/ | |
function gsb_feature_news_display_views_pre_execute(view &$view) { | |
if ($view->name == 'news_two') { | |
dpm($view); | |
$query1 = &$view->build_info['query']; |
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 | |
* Code for the GSB Resources feature. | |
*/ | |
include_once 'gsb_resources.features.inc'; | |
require_once dirname(__FILE__) . '/gsb_resources.formatters.inc'; |