Skip to content

Instantly share code, notes, and snippets.

View HosseinKarami's full-sized avatar
🏠
Working from home

Hossein Karami HosseinKarami

🏠
Working from home
View GitHub Profile
@katydecorah
katydecorah / email-drafter.js
Last active July 19, 2023 22:06
Draft emails in Gmail from a Google spreadsheet and a Google doc template: https://katydecorah.com/code/google-sheets-to-gmail-template/
// What is the Google Document ID for your email template?
var googleDocId = "abcd0000abcd0000abcd0000abcd0000";
// Which column has the email address? Enter the column row header exactly.
var emailField = 'Email';
// What is the subject line?
var emailSubject = 'You\'re bringing {Type}!';
// Which column is the indicator for email drafted? Enter the column row header exactly.
var emailStatus = 'Date drafted';
/* ----------------------------------- */
@chathurawidanage
chathurawidanage / object_entries.js
Last active June 18, 2020 08:22
Iterating Over Object Entries in JS using Object.entries | Performance Comparison [https://gists.cwidanage.com/2018/06/how-to-iterate-over-object-entries-in.html]
let obj = {
key1: "value1",
key2: "value2",
key3: "value3"
}
//convinient forEach
Object.entries(obj).forEach(entry => {
let key = entry[0];
let value = entry[1];
@font-face {
font-family: SegoeUI;
src:
local("Segoe UI Light"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff2) format("woff2"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.woff) format("woff"),
url(//c.s-microsoft.com/static/fonts/segoe-ui/west-european/light/latest.ttf) format("truetype");
font-weight: 100;
}
@omarkdev
omarkdev / sendContactVanilla.js
Created January 31, 2017 00:34
Send form contact with vanilla js
var formFooter = document.getElementById("form-footer");
formFooter.addEventListener("submit", function(evt) {
evt.preventDefault();
formFooter.classList.add("form-submit");
var name = document.getElementById("name");
var email = document.getElementById("email");
var telephone = document.getElementById("telephone");
var cellphone = document.getElementById("cellphone");
@runspired
runspired / form.html
Created May 23, 2016 13:46
How to turn off password and email/username autocomplete.
<!--
<form autocomplete="off"> will turn off autocomplete for the form in most browsers
except for username/email/password fields
-->
<form autocomplete="off">
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields -->
<input id="username" style="display:none" type="text" name="fakeusernameremembered">
<input id="password" style="display:none" type="password" name="fakepasswordremembered">
@stuartduff
stuartduff / storefront-custom-homepage-shortcode-section.php
Created December 8, 2015 22:53
Add a custom shortcode section to the storefront themes homepage template.
function sf_output_custom_shortcode_section() {
echo '<section class="storefront-product-section storefront-product-category">';
echo '<h2 class="section-title">' . __( 'Music Category', 'storefront' ) . '</h2>';
echo do_shortcode( '[product_category category="music" columns="4" per_page="4"]' );
echo '</section>';
@tahirtaous
tahirtaous / Add Custom CSS to Anchors links in WordPress
Last active December 12, 2021 18:27
How to Add Custom CSS Class Directly to Menu Item (Anchors) Links in WordPress Theme
@joaocunha
joaocunha / How To Hide The Select Arrow On Firefox.md
Last active December 10, 2023 13:05
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;