Skip to content

Instantly share code, notes, and snippets.

View cafuego's full-sized avatar
😢

Peter Lieverdink cafuego

😢
View GitHub Profile
auto eth0
iface ath0 inet dhcp
hwaddress 00:01:02:03:04:05
<?php
if (strlen($node->title) < 140) {
return $node->title;
}
return drupal_substr($node->title, 0, 100) . '...';
?>
-----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
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) {
#!/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
@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:

@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'] = [