Skip to content

Instantly share code, notes, and snippets.

View anh-ld's full-sized avatar
Focusing

Anh (Daniel) Le anh-ld

Focusing
View GitHub Profile
### Origin values
- Gender
- 0: both
- 1: male
- 2: female
- Relationship
- 0: both
- 1: in relationship
@anh-ld
anh-ld / giftago-product-custom-feb-6th
Created February 7, 2023 15:59
Giftago product custom code - Feb 6th
<style>
.f-custom-info-box {
background-color: #f2f2f6;
padding: 8px;
border-radius: 5px;
font-family: sans-serif;
font-size: 14px;
border: 1px solid #d4d4d4;
}
@anh-ld
anh-ld / giftago.txt
Last active January 6, 2023 09:15
Giftago Custom Code
/* PRODUCT CUSTOM */
<!-- 1 day = 86400 -->
<style>
.f-custom-info-box {
background-color: #f2f2f6;
padding: 8px;
border-radius: 5px;
font-family: sans-serif;
@anh-ld
anh-ld / medium.js
Last active May 17, 2020 09:10
read-medium-articles-freely
/*
Script to read Medium articles freely
- can be converted to use as bookmarklet
- currently not supported for Safari browser on Medium sub-websites (i.e blog.prototypr.io)
*/
var metaAndroidApp = document.querySelector("meta[property='al:android:app_name']");
var isCurrentSiteMedium = metaAndroidApp && metaAndroidApp.content === "Medium" || false;
/*
DESIGN PATTERN
WHAT:
- reusable solution that can be applied to commonly recurring problems in
- software design
WHY:
- proven solution
- easily reused
Array.prototype.mapX = function(fn) {
let result = []
for (let i = 0, len = this.length; i < len; i++) {
const newItem = fn(this[i], i, this)
result.push(newItem)
}
return result
}