Skip to content

Instantly share code, notes, and snippets.

View Firsh's full-sized avatar

Firsh Firsh

View GitHub Profile
@Firsh
Firsh / functions.php
Last active May 25, 2024 11:00
Simple EXIF display for JIG
<?php
// I recommend using the Code Snippets plugin https://wordpress.org/plugins/code-snippets/
// In the case of which only the below code is needed
// This inserts basic EXIF data in the description of photos in JIG galleries, if available
add_action('init', function() {
add_filter('jig_images', 'jig_exif_captions', 10, 2);
});
@Firsh
Firsh / gist:3c9fd59276871db442586a383174ea99
Created July 6, 2023 19:16
Probably unsupported character <0x7f> with Syncovery
Access to these paths was not possible:
https://u353816.your-storagebox.de/Sync/N/6U81YOwY!Rg3: An unexpected network error occurred. HTTP Error 400 Bad Request
https://u353816.your-storagebox.de/Sync/N/S!JjeJtPFq83/Ii1'_G(zEJ9~u$6#3: An unexpected network error occurred. HTTP Error 400 Bad Request
https://u353816.your-storagebox.de/Sync/N/jdsXZ#VC/,'%BS+t0F`5`8x&h0=m$cW-,i0F8-YFE: An unexpected network error occurred. HTTP Error 400 Bad Request
https://u353816.your-storagebox.de/Sync/N/jdsXZ#VC/Lt,PiuWUwA}Y6WZ(4eU7D64x)bY+CJtN)Xh3: An unexpected network error occurred. HTTP Error 400 Bad Request
https://u353816.your-storagebox.de/Sync/N/4~_Pi9HC8vv],M1%E/hYtPiuxZ~!I1g,QI3/tk^{(cH72/Ru(=z+aS2_wd5ZQK$$N: An unexpected network error occurred. HTTP Error 400 Bad Request
@Firsh
Firsh / vertical-tabs.css
Last active April 11, 2023 21:18
Vertical tabs 2 of 2
/* pure css vertical tabs without addons so they don't go haywire */
:root{
--firsh-tab-width: 250px;
--firsh-tab-height: 30px;
--firsh-tab-top: 94px;
}
#TabsToolbar {
position: absolute;
right: 0;
top: var(--firsh-tab-top);
@Firsh
Firsh / userChrome.css
Last active April 11, 2023 21:19
Vertical tabs 1 of 2
@import url("vertical-tabs.css") screen;
/* vcenter menu */
#menubar-items {
display: flex !important;
align-content: center;
}
/* compact bookmarks */
#PlacesToolbar #PlacesToolbarItems toolbarbutton.bookmark-item {
margin: 0 !important;
@Firsh
Firsh / investing-for-growth-highlights.md
Created March 11, 2023 16:06
Investing for Growth - Terry Smith - my highlights

Investing for Growth: How to Make Money by Only Buying the Best Companies in the World – an Anthology of Investment Writing, 2010–20 - Terry Smith (Highlight: 185; Note: 0)

───────────────

◆ Foreword by Lionel Barber

▪ What Terry has taught me, and I suspect many others, is that there is little to be gained from venturing into the speculation business.

▪ I have little to contribute to the debate about the return of inflation. I would merely add that, in the spirit of Sir Isaac Newton’s third law of physics, at some point the extraordinary actions of the central banks must produce an opposite (if not necessarily equal) reaction.

@Firsh
Firsh / seeking-wisdom-highlights.md
Last active October 7, 2022 21:34
Seeking Wisdom: From Darwin to Munger - Peter Bevelin - my highlights

Seeking Wisdom: From Darwin to Munger - Peter Bevelin (Highlight: 277; Note: 0)

───────────────

◆ Acknowledgments

▪ She is the wind beneath my wings.

◆ Introduction

@Firsh
Firsh / .js
Created July 29, 2022 18:14
JIG settings on chamomileteaparty
{
"timthumb": "https:\/\/www.chamomileteaparty.com\/wp-content\/plugins\/justified-image-grid\/timthumb.php",
"items": [{
"thumbUrl": "https%3A%2F%2Flive.staticflickr.com%2F3835%2F33493990126_5588908960_b.jpg",
"url": "https:\/\/live.staticflickr.com\/3835\/33493990126_a8c53df491_o.jpg",
"width": 231,
"title": "Putin Helps Trump Bring Up His Numbers",
"description": "Two months after Donald Trump&#039;s inauguration, he&#039;s still talking about the number of people who attended his ceremony. The next day, his press secretary, Sean Spicer said:\n\n&lt;em&gt;&quot;Photographs of the inaugural proceedings were intentionally framed in a way, in one particular Tweet, to minimize the enormous support that had gathered on the National Mall,&quot; Spicer said on Jan. 21. &quot;That was the largest audience to witness an inauguration, period. Both in person and around the globe.&quot;&lt;\/em&gt;\n\nWhy is he still talking about this? And, why are we still talking abou
@Firsh
Firsh / spam-links.md
Last active July 23, 2022 10:25
Spam links on Saber
@Firsh
Firsh / functions.php
Created June 30, 2022 10:50
Filebird custom code
<?php
// FileBird Justified Gallery shortcode [filebird_justified_gallery folder="Folder name in FileBird"]
// integrates FileBird (https://wordpress.org/plugins/filebird/) and Justified Image Grid (https://justifiedgrid.com/) plugins
function filebird_justified_gallery_function( $atts ) {
$a = shortcode_atts( array( 'folder' => '', ), $atts );
$foldername = esc_attr($a['folder']);
if ($foldername != '') {
global $wpdb;
$folderid = $wpdb->get_var($wpdb->prepare("SELECT id FROM {$wpdb->prefix}fbv WHERE name = %s", $foldername));
@Firsh
Firsh / pdf-new-tab.user.js
Last active May 8, 2022 16:20
Userscript to open links to PDF files on a new tab
// ==UserScript==
// @name PDF new tab
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://*/*
// @match http://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none