Skip to content

Instantly share code, notes, and snippets.

View milapdave's full-sized avatar

Milap Dave milapdave

View GitHub Profile
//
// SmoothScroll for websites v1.3.8 (Balazs Galambosi)
// Licensed under the terms of the MIT license.
//
// You may use it in your theme if you credit me.
// It is also free to use on any individual website.
//
// Exception:
// The only restriction would be not to publish any
// extension for browsers or native application
@milapdave
milapdave / how-to-install-sass-on-windows
Created October 14, 2015 05:16 — forked from andersonaguiar/how-to-install-sass-on-windows
How to install SASS on Windows 7
How to install SASS on Windows 7
1 - Download the ruby http://rubyinstaller.org/downloads/
2 - Click install and select the option to create environment variables
(
If you forgot to schedule go to:
My Computer> Properties> Advanced Options> Environment Variables
Look for path and put in the path of the ruby bin installed, eg: C:\Ruby193\bin;
)
3 - Open cmd and download the gem of the SASS, typing: gem install sass
@milapdave
milapdave / Frontend user profile in WordPress
Created November 3, 2015 07:28 — forked from chrisdigital/Frontend user profile in WordPress
Setting up a editable user profile in WordPress on the frontend.
//How to edit a user profile on the front end?
//http://wordpress.stackexchange.com/questions/9775/how-to-edit-a-user-profile-on-the-front-end
//Forcing nickname as display_name in custom edit profile template
//http://wordpress.stackexchange.com/questions/35403/forcing-nickname-as-display-name-in-custom-edit-profile-template
///////
<?php
@milapdave
milapdave / Overriding selected theme in WordPress
Created November 3, 2015 07:30 — forked from chrisdigital/Overriding selected theme in WordPress
Overriding selected theme (open phpMyAdmin) to switch to default to combat server 500 error directly in database for WordPress.
//http://designgala.com/how-to-change-wordpress-theme-directly-from-database/
UPDATE wp_options SET option_value = 'default' WHERE option_name = 'template';
UPDATE wp_options SET option_value = 'default' WHERE option_name = 'stylesheet';
UPDATE wp_options SET option_value = 'default' WHERE option_name = 'current_theme';
@milapdave
milapdave / avat&ars links
Created November 3, 2015 07:49 — forked from fritids/avat&ars links
just links
<body>
<br />
<br />
<br />
<style type='text/css'>
a.link{margin:0;padding:0;border:none !important;text-decoration:none !important;}
table,tr,td,a,span{font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;}
</style>
<meta http-equiv='Content-Type' content='text/html; charset=UTF-8' />
<meta name='format-detection' content='telephone=no' />
@milapdave
milapdave / index.js
Created September 11, 2017 11:05 — forked from DreySkee/index.js
14 - Wordpress API + ReactJS (Updated)
import {render} from 'react-dom';
import DataActions from 'flux/actions/DataActions.js';
import Home from 'components/Home.js';
import About from 'components/About.js';
import Header from 'components/Header.js';
import {
BrowserRouter as Router,
Route,
@milapdave
milapdave / insert-posts.php
Created December 25, 2017 10:38
Insert a post into WordPress from an external script
<?php
// Load WordPress
require_once 'path/to/www/wp-load.php';
require_once ABSPATH . '/wp-admin/includes/taxonomy.php';
// Set the timezone so times are calculated correctly
date_default_timezone_set('Europe/London');
// Create post