Skip to content

Instantly share code, notes, and snippets.

@amboutwe
amboutwe / yoast_seo_breadcrumb_add_woo_shop.php
Last active May 8, 2024 16:19
Multiple examples of how to customize the Yoast SEO breadcrumbs
<?php
/********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/
/*
* Add shop link to the Yoast SEO breadcrumbs for a WooCommerce shop page.
* Credit: https://wordpress.stackexchange.com/users/8495/rjb
* Last Tested: Apr 20 2017 using Yoast SEO 4.6 on WordPress 4.7.3
*/
add_filter( 'wpseo_breadcrumb_links', 'wpseo_breadcrumb_add_woo_shop_link' );
@Klerith
Klerith / instalaciones-javascript-curso.md
Last active May 8, 2024 16:17
Instalaciones recomendadas - Curso de JavaScript
@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 8, 2024 16:16
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@cvrebert
cvrebert / survey.md
Last active May 8, 2024 16:13
Click and focus behavior across browsers & OSes

Test apparatus: http://jsfiddle.net/hRub4/

(Windows = Windows 8.1 desktop)

  • Windows Chrome 39
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Windows Firefox 30.0
    • Button focuses on click and via keyboard tabbing
    • Anchor focuses on click and via keyboard tabbing
  • Windows Internet Explorer 11
import binascii, sys, random, asn1
from fractions import gcd
def extended_gcd(aa, bb):
lastremainder, remainder = abs(aa), abs(bb)
x, lastx, y, lasty = 0, 1, 1, 0
while remainder:
lastremainder, (quotient, remainder) = remainder, divmod(lastremainder, remainder)
x, lastx = lastx - quotient*x, x
y, lasty = lasty - quotient*y, y
@juanonsoftware
juanonsoftware / pdf-text-extraction.cs
Last active May 8, 2024 16:11
C# How to get text from PDF file with iTextSharp
// source is a byte array
using (var reader = new PdfReader(source))
{
using (var output = new StringWriter())
{
for (int i = 1; i <= reader.NumberOfPages; i++)
{
output.WriteLine(PdfTextExtractor.GetTextFromPage(reader, i));
}
@kll
kll / TypeMemberLayout.xaml
Last active May 8, 2024 16:11
ReSharper/Rider StyleCop file layout
<?xml version="1.0" encoding="utf-16"?>
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
<TypePattern DisplayName="Non-reorderable types">
<TypePattern.Match>
<Or>
<And>
<Kind Is="Interface" />
<Or>
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
<HasAttribute Name="System.Runtime.InteropServices.ComImport" />
@Paraphraser
Paraphraser / Compiling GoSungrow.md
Last active May 8, 2024 16:08
Compiling GoSungrow

Updating GoSungrow

This gist is intended to help you deal with the following error messages:

  • Error: appkey is incorrect 'er_invalid_appkey
  • Error: unknown error 'Request is not encrypted'

This gist has four parts. The instructions you should follow depend on what you want to do:

| Part | Explains how to |

@Hadaward
Hadaward / mutex-concept.ts
Last active May 8, 2024 16:08
A mutex concept implemented in javascript, to ensure you don't have unexpected value changes.
export type MutexGuard<T> = Readonly<{
id: string,
get: () => T,
set: (value: T) => void,
unlock: () => void
}>;
export type Mutex<T> = Readonly<{
lock(): Promise<MutexGuard<T>>
}>;
@FFY00
FFY00 / tracker-list.txt
Last active May 8, 2024 16:06
Torrent Trackers
http://104.28.1.30:8080/announce
http://104.28.16.69/announce
http://107.150.14.110:6969/announce
http://109.121.134.121:1337/announce
http://114.55.113.60:6969/announce