This file contains 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
-- Logseq Hookmark integration via Applescript | |
-- Copies Links to Pages only, not blocks. | |
tell application "System Events" | |
-- Press "ESC" | |
key code 53 | |
set the clipboard to "" | |
delay 0.5 | |
-- You need to set a keyboard shortcut for "Copy page Url" in Logseq |
This file contains 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
-- Logseq Hookmark integration via Applescript | |
-- Copies Links to pages only, not blocks. | |
-- Paste this into Hook -> Preferences -> Scripts -> Logseq -> Get Address | |
tell application "System Events" | |
set the clipboard to "" | |
delay 0.5 | |
-- You need to set a keyboard shortcut for "Copy page Url" in Logseq | |
-- Here: CMD + CTRL + SHIFT + U |
This file contains 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
// remove Notifications and privacy menu entries | |
add_filter('uwp_account_available_tabs', 'uwp_account_available_tabs_cb'); | |
function uwp_account_available_tabs_cb($tabs){ | |
unset($tabs['notifications']); | |
unset($tabs['privacy']); | |
return $tabs; | |
} | |
// prevent users from accessing other users' profiles | |
add_action('template_redirect', 'template_redirect_cb', 9); |
This file contains 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
#!/usr/bin/env bash | |
# <xbar.title>Hook</xbar.title> | |
# <xbar.version>v1.0</xbar.version> | |
# <xbar.author>Florian Egermann</xbar.author> | |
# <xbar.author.github>flegfleg</xbar.author.github> | |
# <xbar.desc>Show the count of hooked documents in the menu bar.</xbar.desc> | |
count=$(osascript -e' | |
tell application "Hook" |
This file contains 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
tell application "Safari" | |
set spaceID to "SET YOUR SPACE ID" | |
set selectedText to (do JavaScript "(''+getSelection())" in document 1) | |
set docUrl to URL of document 1 | |
set docTitle to name of document 1 | |
set markdownText to "" & selectedText & "" & " - " & docUrl |
This file contains 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 | |
/** | |
* Plugin Name: Change registration url | |
* Description: You need to edit the plugin file in an editor for it to work! | |
* Author: Florian Egermann | |
* Author URI: https://www.fleg.de/ | |
*/ | |
This file contains 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
<div class="grid-layout"> | |
<?php | |
// main query | |
global $post; | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 0; | |
$main_query_args = array( | |
'post_type' => 'post', | |
'posts_per_page' => 10, | |
'category' => 1, |
This file contains 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 | |
/** | |
* Template Name: Front page | |
* | |
* Template Post Type: page | |
* | |
* @link https://codex.wordpress.org/Template_Hierarchy | |
* | |
* @package _s | |
*/ |
This file contains 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
/** | |
* Get the top level parent category, even on sub-categories | |
* @return string | |
*/ | |
function _s_get_parent_cat() { | |
$term = get_queried_object(); | |
$children = get_terms( $term->taxonomy, array( | |
'parent' => $term->term_id, |
This file contains 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
<!-- Front page dein-lastenrad.de / Deutsch. Mirror: https://gist.github.com/flegfleg/637e0dfc0f3e42f7ab53b77a5ebd873a -->__NOTOC__ | |
{{#css: | |
hr, .contentHeader, #catlinks { display: none } | |
h1 { color: #eec241 } | |
.box img { max-width: 50%; margin-top: 30px; } | |
.no-padding { padding: 0; } | |
.hero h1, h2 { border-bottom: 0 } | |
.hero h2 { color: #FFFFFF } | |
.hero.blue .col-md-8{ padding: 0; } | |
.hero.green .col-md-8{ padding: 0; } |
NewerOlder