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
The MACS: Mobile Anchor Capacity system app is provided as-is. The full license and EULA is included in the app. | |
For support inquiries please email web.osha <at> oregon.gov and include "MACS iOS support" in the subject line. |
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 keyvalue_taxonomy_term_list($vocabMachineName){ | |
$tax = taxonomy_vocabulary_machine_name_load($vocabMachineName); | |
$termTree = taxonomy_get_tree($tax->vid); | |
$terms = array(); | |
foreach ($termTree as $idx => $term) { | |
$terms[str_replace($vocabMachineName.'/', '', drupal_lookup_path('alias', 'taxonomy/term/'.$term->tid, 'und'))] = $term->name; | |
} | |
return $terms; |
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
<script src="https://rawgit.com/maciej-gurban/responsive-bootstrap-toolkit/master/js/bootstrap-toolkit.min.js"></script> | |
<script> | |
function getCurrentVP(viewport) { | |
var currentViewport= 'n/a'; | |
if( viewport.is('xs') ) { | |
currentViewport = 'xs'; | |
} | |
else if( viewport.is('sm') ) { | |
currentViewport = 'sm'; |
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
/** | |
* Implements hook_field_attach_view_alter(). | |
* | |
* Hide label of display suite fields if field content is empty. | |
*/ | |
function cof_directory_field_attach_view_alter(&$output, $context) { | |
$displaySuiteFields = array("graduate_students","office_location"); | |
foreach ($output as $field_name => $field) { | |
if (!empty($field['#label_display'])) { |
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
# Originally from http://www.adminarsenal.com/admin-arsenal-blog/powershell-silently-change-firefox-default-search-providers-for-us | |
$Provider = "Google" | |
# Default valid provider options: | |
# Amazon.com, Bing, DuckDuckGo, eBay, Google, Twitter, Wikipedia (en), Yahoo | |
# This disclaimer is required verbatim... | |
$Disclaimer = "By modifying this file, I agree that I am doing so only " | |
$Disclaimer += "within Firefox itself, using official, user-driven search " | |
$Disclaimer += "engine selection processes, and in a way which does not " |
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
#Separates columns in a CSV into individual files with unique values per field | |
# Useful for generating lookup tables with unique values from the original csv's field | |
# | |
# Room for implementation improvement, but this works as a quick and dirty solution | |
#!/usr/bin/python | |
import csv | |
from distutils.util import strtobool |
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
//adapted from http://stackoverflow.com/questions/6001839/check-whether-a-url-variable-is-set-using-jquery | |
//modified to return empty array when no ? params are set | |
$.extend({ | |
getUrlVars: function(){ //return all vars set in $_GET | |
var vars = [], hash; | |
if (window.location.href.indexOf('?') != -1) { | |
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
for(var i = 0; i < hashes.length; i++) | |
{ | |
hash = hashes[i].split('='); |
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 | |
// Enter node NID to export. | |
$nid = 1234; | |
// Use Drupal's export utility to convert the object to code. | |
include_once DRUPAL_ROOT . '/includes/utility.inc'; | |
$export = drupal_var_export(node_load($nid)); | |
// Strip node NIDs and VIDs, so it imports cleanly. |
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
-- main.scpt | |
-- Cocoa-AppleScript Applet | |
tell application "Terminal" | |
activate | |
do shell script "/usr/local/bin/wine '/Users/<user>/.wine/drive_c/Program Files/<programdir>/<program.exe>'" | |
end tell |
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 | |
function win_time($timestr) { | |
return substr($timestr, 4, 2) . "/" . substr($timestr, 6, 2) . "/" . | |
substr($timestr, 0, 4) . " " . substr($timestr, 8, 2) . ":" . | |
substr($timestr, 10, 2) . ":" . substr($timestr, 12, 2) . " " . | |
substr($timestr, -4); | |
}; | |
?> |
NewerOlder