Skip to content

Instantly share code, notes, and snippets.

View paulvanbuuren's full-sized avatar

Paul van Buuren paulvanbuuren

View GitHub Profile
@ankedsgn
ankedsgn / copy-url.html.twig
Created June 21, 2021 17:46
Create a copyable link of an article in drupal
View copy-url.html.twig
<div class="article__copy-link__container">
<div class="button--group-message article__copy-link js-copy-wrap">
<a class="button button--secondary button--icon button--icon-left button--has-message button--copy-link js-copy-link" href="#">
{{ 'Copy the link'|t }}
<svg class="icon icon--link">
<use xlink:href="#icon-link"/>
</svg>
</a>
<div class="button__message js-copy-message">
{{ 'Link copied to clipboard'|t }}
@samuelsmal
samuelsmal / how-to-enable-notes-export-from-kobo.md
Last active February 25, 2024 02:49
how to export notes and highlights from kobo
View how-to-enable-notes-export-from-kobo.md

steps

  1. connect kobo to your device
  2. open a file browser and navigate to the mounted kobo folder
  3. navigate to the hidden folder .kobo/Kobo
  4. open the file Kobo eReader.conf
  5. navigate to the section [FeatureSettings], if it doesn't exist, create it.
  6. add the line ExportHighlights=true and save
  7. disconnect the device
  8. now you can long press on a book and export the note file into a .txt file which will be saved alongside your books. to get it connect your ereader.
@raquelmsmith
raquelmsmith / webfaction-wp-cli.md
Last active February 12, 2021 23:24
How to install WP-CLI on WebFaction
View webfaction-wp-cli.md

I had difficulty installing WP-CLI properly on my WebFaction server because of the inability to use the sudo command to move the .phar file to the proper wp directory. The WebFaction support team was helpful as usual with some good instructions.

  1. Log in to your WebFaction account via SSH: https://docs.webfaction.com/user-guide/access.html
  2. Run the following command on the root directory: curl -so ~/bin/wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar It's probably a good idea to check the download URL there with the official WP-CLI installation instructions to make sure it hasn't changed.
  3. Run the following command: chmod u+x ~/bin/wp
  4. Check to make sure it's installed correctly with wp --info.
@atomtigerzoo
atomtigerzoo / wordpress-disable-yoast-seo-on-custom-post-type.php
Created March 31, 2016 12:39
Wordpress: Disable Yoast SEO on Custom Post Type
View wordpress-disable-yoast-seo-on-custom-post-type.php
function my_remove_wp_seo_meta_box() {
remove_meta_box('wpseo_meta', YOUR_POST_TYPE_NAME_HERE, 'normal');
}
add_action('add_meta_boxes', 'my_remove_wp_seo_meta_box', 100);
@jaredatch
jaredatch / gist:3764381
Last active October 10, 2015 22:58
Customize image size used in the loop by Genesis
View gist:3764381
<?php
/**
* Customize image size used in the loop by Genesis
*
* @author Jared Atchison
* @link http://jaredatchison.com/code/
* @param string $image_size
* @global array $wp_query
* @global int $loop_counter
* @return string
@vasilisvg
vasilisvg / more.md
Last active December 4, 2020 04:48
This is my backup script which syncs my server to my dropbox every day.
View more.md

The script below is triggered every day from my Mac. I use Hazel to move the tar.gz to an external hard disk once it's finished. This happens every day without me noticing. You can exclude folders if you want to. You probably want to exclude giant cache folders.

You should have a similar script.