Skip to content

Instantly share code, notes, and snippets.

View holehan's full-sized avatar

Florian Grässle holehan

View GitHub Profile
@parafeu
parafeu / scrollbar.js
Last active July 26, 2024 05:18
Scrollbar plugin tailwindcss
const plugin = require("tailwindcss/plugin");
module.exports = plugin(function ({ addUtilities, matchUtilities, theme }) {
const scrollbarTrackColorValue = (value) => ({
'--scrollbar-track': value,
'&::-webkit-scrollbar-track': {
"background-color": value
}
})
@ozbillwang
ozbillwang / kubernetes-auto-completion-fish.md
Last active March 28, 2024 18:46
Kubernetes auto-completion works with FISH (better than Bash)
@zinefer
zinefer / seo_schema.html
Last active April 21, 2019 04:32
SEO partial for HUGO
{{- $title := .Site.Title }}
{{- if not .IsHome }}
{{- $title = .Title }}
{{- end }}
{{- $author := dict "@type" "Person" "name" .Site.Params.Author }}
{{- $logo := dict "@type" "ImageObject" "url" .Site.Params.PublisherLogo "width" 60 "height" 60 }}
{{- $publisher := dict "@type" "Organization" "name" .Site.Params.Publisher "logo" $logo }}
@plar
plar / Manifest.txt
Last active January 11, 2023 18:17
Make Java JAR file self executable in linux
Manifest-version: 1.0
Created-By: 1.0 (https://github.com/plar)
Main-Class: hello.Main
function markArchivedAsRead() {
var threads = GmailApp.search('label:unread -label:{inbox, Unsnoozed}');
for (var i=0; i<threads.length; i++)
{
var messages = threads[i].getMessages();
var markUnread = 1;
for (var j=0; j<messages.length; j++)
{
if (messages[j].isInInbox())
markUnread = 0;
@wikrie
wikrie / fritzbox-cert-update.sh
Last active July 15, 2024 14:47
Fritzbox Fritz!Box AVM SSL Letsencrypt automatically update
#!/bin/bash
## this little Gist is for Copy the Letsencrypt Cert from an Linux machine (e.g. Raspberry PI or Synology NAS)
## to the router (Fritzbox).
## It is usefull to be able to speak to the Router over DDNS without any Cert issue in the Browser.
## thanks to https://gist.github.com/mahowi for the perfect Idea
## put it in /etc/letsencrypt/renewal-hooks/post so it gets run after every renewal.
## since Fritz OS 7.25 it is needed to select a Username, from a security point of view
## it is always a good idea to have a non default user name. And as normaly a Fritz Box
## is connected to the Internet, the prefered method should be WITH Username.
@vbsessa
vbsessa / chrome-devtools.md
Last active July 17, 2024 06:01
How to customize Chrome devtools fonts
  1. Enable #enable-devtools-experiments flag in chrome://flags section.

  2. Open Chorme Devtools and check Settings > Experiments > Allow extensions to load custom stylesheets.

  3. Create the following four files in a dedicated folder.

    3.1. devtools.html

    <html>
    <head></head>
    <body><script src="devtools.js"></script></body>
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4

Installation

To install, you need to have the WordPress i18n library on your computer. Check it out using SVN:

sudo svn co http://i18n.svn.wordpress.org/tools/trunk/ /usr/lib/wpi18n

You don't have to put the library in /usr/lib/wpi18n, but if you don't put it there, make sure to set the $WP_I18N_LIB environment variable in your .bashrc or .bash_profile file (with no trailing slash):

export WP_I18N_LIB="/path/to/i18n/lib"

@textarcana
textarcana / centos-install-syntax-highlighting-in-less.sh
Last active May 1, 2023 01:01
2020 update: just use bat(1) instead!!!! bat has git integration and also can show invisible characters! OLD STUFF: How to enable syntax-highlighting in less. Use `less -N` (or type -N while in less) to enable line numbers. Based on the procedure described in http://superuser.com/questions/71588
# Enable syntax-highlighting in less.
# Last tested on CentOS 6.3.
#
# First, add these two lines to ~/.bashrc
# export LESSOPEN="| /usr/bin/src-hilite-lesspipe.sh %s"
# export LESS=" -R "
sudo yum -y install boost boost-devel ctags
wget http://springdale.math.ias.edu/data/puias/unsupported/6/x86_64/source-highlight-3.1.6-3.puias6.x86_64.rpm