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
class Postgis < Formula | |
desc "Adds support for geographic objects to PostgreSQL" | |
homepage "https://postgis.net/" | |
url "https://download.osgeo.org/postgis/source/postgis-3.2.1.tar.gz" | |
sha256 "fbab68dde6ca3934b24ba08c8ab0cff2594f57f93deab41a15c82ae1bb69893e" | |
license "GPL-2.0-or-later" | |
revision 5 | |
livecheck do | |
url "https://download.osgeo.org/postgis/source/" |
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
let test = usefulHash({test: [1,2,3], dude: 'hi'}) | |
test.forEach(function(k, v) { console.log(`${k}, ${v}`) }) | |
test['zombies'] = true | |
test.forEach(function(k, v) { console.log(`2: ${k}, ${v}`) }) | |
console.log(test.keys()) | |
console.log(test.values()) |
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
server { | |
listen 80; | |
server_name optoro optoro.local; | |
location / { | |
root /opt/development/optoro-wp-com/wordpress; | |
index index.php; | |
try_files $uri $uri/ /index.php?$args; | |
} | |
rewrite /wp-admin$ $scheme://$host$uri/ permanent; |
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
[mysqld] | |
# Slow Log | |
#slow_query_log = 1 | |
#log_queries_not_using_indexes = 1 | |
#long_query_time = 1 | |
# Disable DNS lookups for performance | |
skip_name_resolve | |
# MySQL >= 5.5.5 uses InnoDB by default, but set it just in case |
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
/** | |
* Take a camel case word and turn it into snake case | |
* i.e. layoutBlock to layout-block | |
*/ | |
String.prototype.toSnakeCase = function() { | |
return this.replace(/ /g, '-').replace(/([a-z0-9])([A-Z0-9])/g, '$1-$2').toLowerCase(); | |
} |
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 type="text/javascript"> | |
//fix relative base paths in IE | |
var base = document.getElementsByTagName('base')[0]; | |
base.href = base.href; | |
</script> |
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
/** | |
* Adds Closed Captioning support to the MediaElement module - http://www.drupal.org/project/mediaelement | |
* | |
* Parts of this should be turned into a patch eventually for that module. | |
* | |
* The preprocess assumes a field_collection with the media file field and a file field to upload captions | |
* This can obviously be altered to work with other configurations. | |
*/ | |
/** | |
* Implements hook_theme_registry_alter(). |
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 | |
$render = array(); | |
//Good | |
$render['top'] = array( | |
'#type' => 'items_list', | |
'#items' => array( | |
array('#data' => 'lololol'), | |
), |
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 WidgetInterface::getPreviewForm(). | |
* | |
* Return a form to collect the date information from the user. | |
*/ | |
public function getPreviewForm($element, &$form_state) { | |
$element['#type'] = 'fieldset'; | |
$element['#title'] = empty($this->settings['title']) ? t('Date/Time:') : $this->settings['title']; | |
$element['#description']= t('Preview nodes published on or after this date.'); |
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 | |
/** | |
* Fake enables a module for the purpose of a unit test | |
* | |
* @param $name | |
* The module's machine name (i.e. ctools not Chaos Tools) | |
*/ | |
protected function enableModule($name) { | |
$modules = module_list(); |
NewerOlder