Skip to content

Instantly share code, notes, and snippets.

@plsankar
plsankar / mailchimp4wordpress.scss
Created October 5, 2020 14:46 — forked from scharc/mailchimp4wordpress.scss
Resonds format for MailChimp4WordPress Plugin in combination with bootstrap 3.3.6
#newsletter-form {
color: white;
input {
border-radius: 0px !important;
}
.mc4wp-response {
text-align: center;
@extend .container;
margin: 15px 0px;
.mc4wp-alert,
@plsankar
plsankar / header_http_status_codes.php
Created June 6, 2020 17:17 — forked from phoenixg/header_http_status_codes.php
PHP header() for sending HTTP status codes
<?php
/*
参考自:
http://darklaunch.com/2010/09/01/http-status-codes-in-php-http-header-response-code-function
http://snipplr.com/view/68099/
*/
function HTTPStatus($num) {
$http = array(
//* Adding DNS Prefetching
function wp_dns_prefetch() {
echo '<meta http-equiv="x-dns-prefetch-control" content="on">
<link rel="dns-prefetch" href="//fonts.googleapis.com" />
<link rel="dns-prefetch" href="//fonts.gstatic.com" />
<link rel="dns-prefetch" href="//ajax.googleapis.com" />
<link rel="dns-prefetch" href="//apis.google.com" />
<link rel="dns-prefetch" href="//google-analytics.com" />
<link rel="dns-prefetch" href="//www.google-analytics.com" />
<link rel="dns-prefetch" href="//ssl.google-analytics.com" />
@plsankar
plsankar / custom-domain-localhost-xampp
Created July 16, 2019 13:16 — forked from oozman/custom-domain-localhost-xampp
How to add a custom domain name on your localhost using XAMPP. Codes are based on Windows, but Step 2 onwards are pretty much applicable on other operating system.
Step 1:
Go to: C:\Windows\System32\Drivers\etc\hosts
And add this to the bottom of the file:
=============
127.0.0.1 your.domain.com
=============
Step 2:
Go to [your XAMPP directory]/apache/conf/httpd-xampp.conf
@plsankar
plsankar / EqualSpacingItemDecoration.java
Created February 1, 2018 16:41 — forked from alexfu/EqualSpacingItemDecoration.java
Add equal spacing to RecyclerView items automatically. Can handle horizontal, vertical, and grid display modes
import android.graphics.Rect;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
public class EqualSpacingItemDecoration extends RecyclerView.ItemDecoration {
private final int spacing;
private int displayMode;
public static final int HORIZONTAL = 0;