Skip to content

Instantly share code, notes, and snippets.

@strarsis
strarsis / core.min.js (deminified using jsnice.org)
Last active April 22, 2017 14:33
wp-includes/js/jquery/ui/core.min.js (WordPress 4.7.4 - official)
!function(factory) {
if ("function" == typeof define && define.amd) {
define(["jquery"], factory);
} else {
factory(jQuery);
}
}(function($) {
/**
* @param {Element} element
* @param {boolean} isTabIndexNotNaN
@strarsis
strarsis / core.min.js (deminified using jsnice.org)
Created April 22, 2017 14:33
wp-includes/js/jquery/ui/core.min.js (WordPress 4.7.4 - composer package)
!function(factory) {
if ("function" == typeof define && define.amd) {
define(["jquery"], factory);
} else {
factory(jQuery);
}
}(function($) {
/**
* @param {Element} element
* @param {boolean} isTabIndexNotNaN
@strarsis
strarsis / gist:fd3c5b3381b1ac5d5534e742063fab6d
Created May 8, 2017 21:41 — forked from seamusleahy/gist:3098949
Create a curve to text using Lettering.js, Sass, and Compass
/* Add a wave alignment to your title text using Sass, Compass, and Lettering.js.
*
* Lettering.js wraps each letter with a span with a class of .char<#>.
* Compass provides math functions including the sin which provides the wave form.
*/
$length: 11; // The word is 11 letters long
@for $i from 1 through $length {
.char#{$i} {
@include transform(translateY( sin(($i - 1)/($length - 1)*2*pi()) * -25px) );
@strarsis
strarsis / change_post_menu_label.php
Created May 20, 2017 13:24 — forked from nciske/change_post_menu_label.php
WordPress Change Post to Article
<?php
/* Change Post to Article */
function change_post_menu_label() {
global $menu;
global $submenu;
$menu[5][0] = 'Articles';
$submenu['edit.php'][5][0] = 'Articles';
$submenu['edit.php'][10][0] = 'Add New';
$submenu['edit.php'][16][0] = 'Tags';
@strarsis
strarsis / one-page-nav.js
Created May 26, 2017 18:40 — forked from jpen365/one-page-nav.js
One-page nav code for twenty seventeen
/*
One page nav code
*/
jQuery( document ).ready(function(){
/* Add padding and id's to each front page section */
jQuery( "h2.entry-title" ).each( function() {
var panelId = jQuery( this ).html().toLowerCase().replace(/\s+/g, "-");
jQuery( this ).wrapInner(function() {
return "<span style='padding-top:96px;' id='" + panelId + "'></span>";
@strarsis
strarsis / docker-on-wsl-windows-10-home-docker-toolbox.md
Last active September 4, 2023 07:29
Notes about Docker on WSL (Windows 10 Home / Docker Toolbox) (Virtualbox instead Hyper-V)

Edit (September 2020):

function tattoo_submit() {
if (isset($_POST["addtattoo"])) {
$title = "Tattoo : ". $_POST["tatooInput"];
$my_post = array(
'post_title' => $title,
'post_status' => 'publish',
'post_author' => 1,
@strarsis
strarsis / example.php
Last active January 8, 2018 00:13
Set Google Maps key for ACF and ACF PRO
<?php
// Add this code to plugin or theme
// Authorize API for project:
// see https://console.developers.google.com/apis/api/places_backend?project=_
const GOOGLE_API_KEY = 'the-API-key';
// ACF
@strarsis
strarsis / howto.md
Last active April 8, 2024 04:34
KeeAgent (for KeePass) on Bash on Windows / WSL (2)

Update (March 2023) (Last checked: March 2024)

Side note: The latest edge build of KeeAgent plugin offers an option for creating a WSL compatible socket. This would be very handy. I already tried to use that socket, but the socket file is currently empty and ssh inside WSL 2 is unable to use it. This appears to be a very new, unreleased and unstable feature. I will follow the development of it and when it finally works (well, for me) I will update this HOWTO. But until then, please use the proven wsl-ssh-agent/npiperelay.exe approach below.

Thanks to the instructions for WSL 2 of the wsl-ssh-agent project, KeeAgent works great in WSL 2 now: https://github.com/rupor-github/wsl-ssh-agent#wsl-2-compatibility The approach uses minimal and well maintained tools.

Mini-changelog

  • (16.03.2024) Add: Ensure 7z and wslvar being available (thanks @johnzielk
@strarsis
strarsis / msysgit2unix-socket.py
Created January 14, 2018 22:33 — forked from kevinvalk/msysgit2unix-socket.py
Updated to better survive crashes and other unexpected behavior.
#!/usr/bin/python
"""
msysGit to Unix socket proxy
============================
This small script is intended to help use msysGit sockets with the new Windows Linux Subsystem (aka Bash for Windows).
It was specifically designed to pass SSH keys from the KeeAgent module of KeePass secret management application to the
ssh utility running in the WSL (it only works with Linux sockets). However, my guess is that it will have uses for other