Skip to content

Instantly share code, notes, and snippets.

View vishwasnavadak's full-sized avatar
🎯
Trying to hit the targets.

Vishwasa Navada K vishwasnavadak

🎯
Trying to hit the targets.
View GitHub Profile
@orangexception
orangexception / gist:1301150
Created October 20, 2011 13:33
Minify JavaScript Regular Expression

Notice

Do not run this against minified JavaScript packages. The minified packages often rely on line returns to execute correctly.

This regular expression was designed to minify simple JavaScript.

Regular Expression

(?s)[\t\r\n]|[ ][ ]+|/\*.*?\*/*

I put spaces in square brackets as a reminder that they exist. Spaces can be important. For example, $( "#foo #bar" ) should not become $("#foo#bar"). However, we do want to remove spaces if they are used for indentation.

@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@erobert17
erobert17 / bootstrap-3-vert-offset-shim.css
Last active May 2, 2022 18:36
Adds a vertical offset top and bottom to Bootstrap 3 to be used within columns. Currently no vertical offset is available as standard in Bootstrap 3.
/*
Include this after bootstrap.css. Add class of
vert-offset-top-value or vert-offset-bottom-value
to your Bootstrap 3 default rows to prevent row content
from touching the row content above or below.
*/
/* Vertical Offset Bottom */
.vert-offset-top-12{
margin-top: 12em;
@staltz
staltz / introrx.md
Last active July 15, 2024 15:43
The introduction to Reactive Programming you've been missing
@roachhd
roachhd / quick-ref-jekyll-markdown.md
Created November 11, 2014 09:15
Jekyll Markdown Quick Reference

#Jekyll Markdown Quick Reference

####Write in simply awesome markdown

layout: post
title: Markdown Style Guide
---
@mohammadmursaleen
mohammadmursaleen / gist:9622098e43afdab6025e
Last active October 15, 2021 18:29
Adding custom fields above WOOCOMMERCE add to cart button
<?php
// To add custom data above add to cart button in woocommerce
// step 1
add_action('wp_ajax_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback');
add_action('wp_ajax_nopriv_wdm_add_user_custom_data_options', 'wdm_add_user_custom_data_options_callback');
function wdm_add_user_custom_data_options_callback()
@chranderson
chranderson / nvmCommands.js
Last active July 11, 2024 23:08
Useful NVM commands
// check version
node -v || node --version
// list locally installed versions of node
nvm ls
// list remove available versions of node
nvm ls-remote
// install specific version of node
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 16, 2024 13:09
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@codediodeio
codediodeio / database.rules.json
Last active June 22, 2024 07:03
Common Database Rules for Firebase
// No Security
{
"rules": {
".read": true,
".write": true
}
}
@jbutz
jbutz / main.js
Created November 15, 2017 15:25
Bootstrap Basic Navbar Collapse, no jQuery or Bootstrap JS
let collapseElements = document.querySelectorAll('[data-toggle="collapse"]');
const CLASS_SHOW = 'show';
const CLASS_COLLAPSE = 'collapse';
const CLASS_COLLAPSING = 'collapsing';
const CLASS_COLLAPSED = 'collapsed';
const ANIMATION_TIME = 350; // 0.35s
function handleCollapseElementClick(e) {
let el = e.currentTarget;
let collapseTargetId = el.dataset.target || el.href || null;