Skip to content

Instantly share code, notes, and snippets.

View wapcrazut's full-sized avatar
🍄
Leveling up

Williams Abraham wapcrazut

🍄
Leveling up
View GitHub Profile
@ppazos
ppazos / levenshtein_rto.sql
Last active September 14, 2023 16:22
MySQL Levenshtein Ratio Function
DELIMITER $$
CREATE FUNCTION levenshtein_rto( s1 VARCHAR(255), s2 VARCHAR(255) )
RETURNS FLOAT
DETERMINISTIC
BEGIN
DECLARE s1_len, s2_len, i, j, c, c_temp, cost INT;
DECLARE s1_char CHAR;
-- max strlen=255
DECLARE cv0, cv1 VARBINARY(256);
@Srfigie
Srfigie / .gitattributes
Created February 2, 2020 14:30 — forked from nemotoo/.gitattributes
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@jimmywarting
jimmywarting / readme.md
Last active June 5, 2024 05:12
Cors proxies
Exposed headers
Service SSL status Response Type Allowed methods Allowed headers
@Dammmien
Dammmien / mustache.md
Last active April 27, 2023 22:41
Mustache cheatsheet

Basic tag

  Hello {{name}} !!

Comments

 {{! This is a comment, and it won't be rendered }}
// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@subfuzion
subfuzion / curl.md
Last active June 6, 2024 17:52
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

/**
* jQuery 2.1.3's parseHTML (without scripts options).
* Unlike jQuery, this returns a DocumentFragment, which is more convenient to insert into DOM.
* MIT license.
*
* If you only support Edge 13+ then try this:
function parseHTML(html, context) {
var t = (context || document).createElement('template');
t.innerHTML = html;
return t.content;
@DenisIzmaylov
DenisIzmaylov / i18n-data.json
Last active May 3, 2021 21:12
Easy i18n translation in your ES6 apps
{
"ru": {
"Your original english text": "Твой оригинальный русский текст"
}
}
@nickcernis
nickcernis / mailchimp-popup-for-wordpress.md
Last active July 28, 2022 14:49
MailChimp Popup Script that works with WordPress sites

MailChimp's default popup scripts can break on WordPress sites that use jQuery/jQuery UI unless you include their embed code as the final elements before the closing body tag.

Including them in this way isn't always possible or easy with WordPress.

The code below is an alternative implementation of the loader that forces MailChimp's popup scripts to appear below all other scripts upon page load.

To use it, modify the baseUrl, uuid, and lid attributes with the ones from the original popup script that MailChimp supplies.

@swas
swas / gist:10643194
Created April 14, 2014 12:25
PHP replacing special characters like à->a, è->e
// http://stackoverflow.com/questions/10152894/php-replacing-special-characters-like-a-a-e-e?answertab=votes#tab-top
// PHP.net User notes
<?php
$string = "ʿABBĀSĀBĀD";
echo iconv('UTF-8', 'ISO-8859-1//TRANSLIT', $string);
// output: [nothing, and you get a notice]
echo iconv('UTF-8', 'ISO-8859-1//IGNORE', $string);