Skip to content

Instantly share code, notes, and snippets.

https://codepen.io/patilswapnilv/pen/vYBJYVV
https://codepen.io/patilswapnilv/pen/oNNzRMx
https://codepen.io/patilswapnilv/pen/XqLgyY
https://github.com/patilswapnilv/login-and-logout-redirect
https://github.com/patilswapnilv/Gravity-Pre-submission-Confirmation
@patilswapnilv
patilswapnilv / google-apps-script.md
Created June 26, 2019 06:01 — forked from labnol/google-apps-script.md
How to Learn Google Apps Script - The best resources for learning Google Apps Script, the glue that connects GSuite services including Gmail, Google Drive, Calendar, Maps, Analytics and more.

Learning Google Apps Script

The best place to learn more about Google Script is the official documentation available at developers.google.com. Here are other places that will help you get up to speed.

  1. Google Apps Scripts - Snippets by +Amit Agarwal
  2. Apps Script Starter - Create Google Apps Script projects locally inside VS Code.
  3. Digital Inspiration by +Amit Agarwal - Google Addons
  4. Awesome Google Scripts by +Amit Agarwal
  5. Build with Google Apps Script - Setup a local development environment for Apps Script
  6. Apps Script Webinars - YouTube - by +Eric Koleda
@patilswapnilv
patilswapnilv / download-slack-emoji.sh
Created May 13, 2019 06:45 — forked from stefansundin/download-slack-emoji.sh
Download all of your Team's custom Slack emojis.
#!/bin/bash
# get a token from https://api.slack.com/custom-integrations/legacy-tokens
# or if you don't have permissions to create one, you can inspect the Slack web client and you can get the one it is using
SLACK_TOKEN=
curl -q -s "https://slack.com/api/emoji.list?token=$SLACK_TOKEN" | jq -Mr '.emoji | to_entries | .[] | select(.value | startswith("http")) | "\(.key) \(.value)"' | sort | while read name url; do
fn="$name.${url##*.}"
echo "$fn"
curl -q -s -o "$fn" "$url"
done
@patilswapnilv
patilswapnilv / meta-tags.md
Created March 23, 2019 16:04 — forked from lancejpollard/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 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">
<meta name="language" content="ES">
<?php
/*
* 1. Go to Settings > Permalinks and select any page as home page
* Then use the following code
*
* You can add those codes in your functions.php in the theme, if you think your theme won’t be changed.
* Otherwise mu-plugins is the best solution. To use mu-plugins, go to /wp-content/ and find the folder with name 'mu-plugins'.
* If there is no folder in that name, then create a folder, name it 'mu-plugins', create a file inside that,
* give any name you like and paste the code in there. You don't need to activate that plugin. Mu-plugins means must use plugins,
* so it will be activated automatically always. If you use mu-plugins then add a php start tag at the beginning of the code.
@patilswapnilv
patilswapnilv / wp.sh
Created March 7, 2019 18:07 — forked from bgallagh3r/wp.sh
Wordpress: Bash Install Script -- Downloads latest WP version, updates wp-config with user supplied DB name, username and password, creates and CHMOD's uploads dir, copies all the files into the root dir you run the script from, then deletes itself!
#!/bin/bash -e
clear
echo "============================================"
echo "WordPress Install Script"
echo "============================================"
echo "Database Name: "
read -e dbname
echo "Database User: "
read -e dbuser
echo "Database Password: "
@patilswapnilv
patilswapnilv / index.html
Created November 12, 2018 19:29
Text clipping and perspective parallax
<div class="header">
<h1 class="header__initials">SP</h1>
<div class="header__title">
<h2>Swapnil Patil</h2>
<p>Web Developer &amp; UX Designer</p>
</div>
</div>
@patilswapnilv
patilswapnilv / gutenberg-test-data.html
Created October 22, 2018 05:20
Sample content of several Gutenberg blocks that you can simply paste into a test page on your site.
<!-- wp:heading -->
<h2>Heading Block (H2)</h2>
<!-- /wp:heading -->
<!-- wp:heading -->
<h3>You are looking at one. (H3)</h3>
<!-- /wp:heading -->
<!-- wp:heading -->
<h2>Subhead Block</h2>
@patilswapnilv
patilswapnilv / header_ogp.php
Last active July 24, 2018 07:25
Open Graph protocol for WordPress
<?php
/**
* Open Graph protocol for WordPress
* @version 0.9.2
* @author patilswapnilv
* @link https://gist.github.com/patilswapnilv/9f393c252b8558c4b31a1bc21f24e88d
*/
// key into custom fields for description. Default is for All in One SEO Pack
define('WP_OGP_POST_DESCRIPTION_KEY', '_aioseop_description');
@patilswapnilv
patilswapnilv / functions.php
Last active June 25, 2018 12:20
Change the “Enter title here” placeholder text to make it fit your content. https://swapnil.blog/change-the-enter-title-here-placeholder-text-to-make-it-fit-your-content
<?php
// Change placeholder text for post titles
add_filter( 'enter_title_here', 'my_title_placeholders' );
function my_title_placeholders( $placeholder ){
$screen = get_current_screen();
switch ( $screen->post_type ) {
case 'people':
$placeholder = __( 'Enter full name' );