Skip to content

Instantly share code, notes, and snippets.

View cafuego's full-sized avatar
😢

Peter Lieverdink cafuego

😢
View GitHub Profile
@cafuego
cafuego / 2842739-14.patch
Created August 17, 2018 08:46
PWA module 404 fix
diff --git a/pwa.module b/pwa.module
index a87172b..fe22fe9 100644
--- a/pwa.module
+++ b/pwa.module
@@ -27,7 +27,7 @@ function pwa_permission() {
function pwa_menu() {
$items = [];
- $items['pwa/serviceworker.js'] = [
+ $items['pwa/serviceworker/js'] = [
@cafuego
cafuego / build-tensorflow-from-source.md
Last active September 19, 2019 06:46 — forked from Brainiarc7/build-tensorflow-from-source.md
Build Tensorflow from source, for better performance

Building Tensorflow from source on Linux for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit.

Step 2. Install NVIDIA cuDNN:

#!/bin/bash
#
# Wait for the system load to hit a set level. Can be used in init
# scripts to avoid insane load spikes. Use the return value to abort
# starting processes if the load remains too high.
#
# wait_timeout.sh 4 || exit 0
# Default sleep interval in seconds.
SLEEP=30
<?php
function theme_service_links_build_link($variables) {
$text = $variables['text'];
$url = $variables['url'];
$image = $variables['image'];
$nodelink = $variables['nodelink'];
$style = $variables['style'];
$attributes = $variables['attributes'];
if ($nodelink) {
-----BEGIN PGP MESSAGE-----
Version: GnuPG/MacGPG2 v2
hQEMA/1Zj4RKsVZAAQf9EAo/cqzQiXnOL8tt3SGbfd9DkMMsSHuzu7xnXw3BsMmz
IpH/CyKs+3O8CG/wWRUZ26n01zOm1cE1dFdj7QIRbpcVxTMbzQrPYsDTpjoqoxn+
WGK6U+bMFzyyq61xC/zAvZwaXdsXXJf2gOMZVcwKCXEwUabpASZikysqD+kDIc7l
iwTWVpb626e09c8W5uwuaBZqVFFQE3anDRVdB1ZW3KWTDMsppoXGYTRQTGOn0j7M
lghrjEokKgguvXOj8ahT5pfHmqj1LwDfIfM0mdlIKKus6Mamqq0hzzcnURk5sg01
8FeKM7ZGftO0PmqSZLXIv+LtMtEBwZnqNRiIwW+X4YUBDgONgwdorZzXuRAD/i27
gJgCrCzLGxErgwtj0JX5wJGg7epLicHO76OmyidCQnoRQiQ+8fD32lcT/WUv6fSX
<?php
if (strlen($node->title) < 140) {
return $node->title;
}
return drupal_substr($node->title, 0, 100) . '...';
?>
auto eth0
iface ath0 inet dhcp
hwaddress 00:01:02:03:04:05
<?php
/**
* Example of placeholder text on a FAPI form element.
*/
$form['contact']['customerfirstname'] = array(
'#type' => 'textfield',
'#title' => t('First name'),
'#required' => TRUE,
// Other element settings...
'#attributes' => array(
diff --git a/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc b/app/profiles/cod/modules/contrib/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
index 9c1d81f..431a567 100644
--- a/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
+++ b/views/modules/taxonomy/views_plugin_argument_default_taxonomy_tid.inc
@@ -28,6 +28,7 @@ class views_plugin_argument_default_taxonomy_tid extends views_plugin_argument_d
$options['term_page'] = array('default' => TRUE, 'bool' => TRUE);
$options['node'] = array('default' => FALSE, 'bool' => TRUE);
+ $options['user'] = array('default' => FALSE, 'bool' => TRUE);
$options['anyall'] = array('default' => ',');

Keybase proof

I hereby claim:

  • I am cafuego on github.
  • I am cafuego (https://keybase.io/cafuego) on keybase.
  • I have a public key whose fingerprint is 9662 1CB5 8E54 450D 2E12 9D7E 580E 2519 969F 3F57

To claim this, I am signing this object: