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 theme_menu_link() for the main menu when displayed in menu_block | |
* block. | |
* | |
* Stock bootstrap theme doesn't render menus deeper than 2 levels because the | |
* navbar feature doesn't support a third level. But when rendering the menu in | |
* the sidebar, we can do unlimited nesting because we're not using the dynamic | |
* navbar. | |
* |
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_preprocess() | |
* | |
* For each context currently activated, add a theme suggestion for each | |
* existing suggestion. If you have a context called "everywhere", we don't | |
* generate a suggestion for that context. | |
* | |
* FIXME: This doesn't indicate which context is positioning each | |
* individual item. Usually this isn't a problem, but it should be fixed. |
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_preprocess_block() | |
* | |
* For each bean block, add a template suggestion containing the name of the | |
* region where the block will appear. | |
* | |
* Requires "bean" module (fieldable blocks) | |
*/ | |
function THEME_preprocess_entity(&$vars, $hook) { |
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 | |
/** @file squishy.drush.inc | |
* | |
* Place this file in sites/all/drush to enable its features. Attempts to | |
* prevent sql-sync to prod and sets up some safe dev settings after a sql-sync | |
* from anywhere. | |
*/ | |
/** | |
* Implements drush_hook_pre_sql_sync() |
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
# LVM is an advanced system. This document only describes my use case. | |
# I use it on a pair of external USB disks; these commands help me to mount & unmount logical volumes on my laptop. | |
##### | |
# Plug in the disks, mount them | |
vgscan # maybe optional | |
vgchange -ay # creates /dev/* entries | |
mount /dev/<vgname>/<lvname> /mountpoint |
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
from rest_framework import viewsets | |
from django.http import Http404 | |
class MyViewSet(viewsets.ModelViewSet): | |
serializer_class = MySerializer | |
# ... | |
def update(self, request, *args, **kwargs): | |
partial = kwargs.get('partial', False) | |
try: |
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 mycustomurlprocessor_module_implements_alter(&$implementations, $hook) { | |
if ($hook == 'facetapi_searcher_info_alter') { | |
# move our implementation to the end of the list so we can override the | |
# alterations made by facetapi_pretty_paths_facetapi_searcher_info_alter | |
$group = $implementations['mycustomurlprocessor']; | |
unset($implementations['mycustomurlprocessor']); | |
$implementations['mycustomurlprocessor'] = $group; | |
} |
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
Simple Rewards: | |
Ride on first day of bike month | |
Ride in first week of bike month | |
Ride in bike week | |
Ride every week of bike month | |
Ride every day of bike week | |
First ride in a while | |
Fourth ride of the day (when norm is 2) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
ios_distanceFromLocation | geopy_great_circle | geopy_vincenty | great_circle_difference | vincenty_difference | |
---|---|---|---|---|---|
3.93925768 | 3.9281531653 | 3.93922265629 | 0.0111045147028 | 3.50237133229e-05 | |
25.72370334 | 25.7073197794 | 25.7236413377 | 0.0163835605726 | 6.20023199041e-05 | |
5.46728098 | 5.45349443375 | 5.46725389515 | 0.0137865462544 | 2.70848484067e-05 | |
8.29325257 | 8.27305170503 | 8.2932119731 | 0.0202008649714 | 4.05968985113e-05 | |
9.69501709 | 9.67160552512 | 9.69496572517 | 0.0234115648778 | 5.13648320624e-05 | |
6.00842669 | 5.99403658269 | 6.00839455602 | 0.014390107307 | 3.21339784124e-05 | |
5.12883773 | 5.11445893246 | 5.12880707646 | 0.0143787975444 | 3.06535422894e-05 | |
0.0 | 0.0 | 0.0 | 0.0 | 0.0 | |
0.0 | 0.0 | 0.0 | 0.0 | 0.0 |
OlderNewer