Skip to content

Instantly share code, notes, and snippets.

View Wijayaac's full-sized avatar
💭
Open for Opportunity

Kadek Wijaya Wijayaac

💭
Open for Opportunity
View GitHub Profile
{%comment%}
#############################################
# Mohamed El-Ghorfi Discount Code on Cart #
# [UPDATED] #
#############################################
# Paypal Me: https://paypal.me/elghorfimed #
# Buy Me A Coffee: #
# https://www.buymeacoffee.com/elghorfi #
#############################################
# elghorfi.med@gmail.com #
/*
* Try to login, check the login credentials, and then redirect if required.
*/
login(email, password).done(function (html) {
if (html.indexOf('Invalid login credentials') !== -1) {
// invalid password - show a message to the user
} else {
// All good! Let's redirect if required
var checkoutUrl = getCheckoutUrl();
@brandonjp
brandonjp / findOverflowParents.js
Last active April 8, 2026 14:47
find overflow:hidden ancestors
// when you're trying to use `position:sticky` on an element
// you'll have trouble if any parent/ancestor element has
// overflow set to anything other than "visible" (such as: auto,hidden,overlay,scroll)
// & turns out if a parent is `display:flex` it might need some love
// (to remedy this you can set the `align-self` of your sticky element)
// see here for how the display & align-self properties affect: http://bit.ly/2ZaRu4o
// so, to find those troublesome parents...
// copy & paste this into Chrome Inspector/Dev Tools console
// (and be sure to change the #stickyElement below, if needed)
@laurenfazah
laurenfazah / express_postgress_knex.md
Last active December 22, 2025 18:18
Cheat Sheet: Setting up Express with Postgres via Knex

Express & Postgres via Knex

Note: <example> is meant to denote text replaced by you (including brackets).

Setup

// global dependencies
npm install -g knex
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 31, 2026 18:26
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@dhimasanb
dhimasanb / php.ini
Created May 28, 2017 21:11
My PHP Config for Laravel
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
@AdamMarsden
AdamMarsden / sassas.md
Last active February 12, 2026 09:13
Sass Architecture Structure

Sass Architecture Structure

sass/
|
|– base/
|   |– _reset.scss       # Reset/normalize
|   |– _typography.scss  # Typography rules
|   ...                  # Etc…
|
@rosswd
rosswd / multi-git-win.md
Last active November 19, 2025 00:02
Setting up a Github and Bitbucket account on the same computer on Mac OS. Now with a guide for Windows 10.

Setting up github and bitbucket on the same computer (Windows)

Guide for Windows

mix3d asked for some help using this guide with windows so here we go. This was tested with Windows 10. Run all commands in Git Bash once it's installed.

Github will be the main account and bitbucket the secondary.

Git for Windows

  • Download and install Git for Windows
    • In the installer, select everything but decide if you want a desktop icon (2nd step)