Skip to content

Instantly share code, notes, and snippets.

View sarveshacharya's full-sized avatar

Sarvesh Acharya sarveshacharya

View GitHub Profile
@BFTrick
BFTrick / woocommerce-remove-virtual-billing-fields.php
Last active February 19, 2024 17:23
Remove the billing address fields for free virtual orders in WooCommerce
<?php
/**
* Plugin Name: WooCommerce Remove Billing Fields for Free Virtual Products
* Plugin URI: https://gist.github.com/BFTrick/7873168
* Description: Remove the billing address fields for free virtual orders
* Author: Patrick Rauland
* Author URI: http://patrickrauland.com/
* Version: 2.0
*
* This program is free software: you can redistribute it and/or modify
@nmec
nmec / WP-3.4.php
Created September 7, 2012 08:27
Sorting a WordPress loop by post__in
<?php
$posts = array(5, 2, 43, 12);
// Get the posts
$my_loop = new WP_Query(array(
'post__in' => $posts,
'post_type' => 'any',
'posts_per_page' => -1,
));
@dwayne
dwayne / 00-install-on-64-bit-ubuntu-14.04.md
Last active January 12, 2024 17:48
Installing node and npm on Ubuntu 12.04 LTS and 64-bit Ubuntu 14.04 LTS.
  1. Navigate to http://nodejs.org/download/ and on the Linux Binaries (.tar.gz) row click to download the 64-bit version of the current latest release.

  2. Say you've downloaded node-v0.10.7-linux-x64.tar.gz into the Downloads directory. Then, open the terminal and type the following:

$ cd ~/Downloads
$ mkdir -p ~/local/node
$ tar xzf node-v0.10.7-linux-x64.tar.gz -C ~/local/node --strip-components=1
$ echo '# Node Enviroment Setup' >> ~/.bashrc
$ echo 'export PATH=$HOME/local/node/bin:$PATH' &gt;&gt; ~/.bashrc
@azampagl
azampagl / server.js
Created May 27, 2012 16:58
Joyent - NodeJS Smart Machine - Multiple application with http/https (SNI browser support required)
var http = require('http');
var https = require('https');
var httpProxy = require('http-proxy');
var crypto = require('crypto');
var fs = require('fs');
/*
* Server configurations
*/
var servers = {
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@christophermanning
christophermanning / README.md
Last active November 22, 2022 22:14
Bitbucket Download Directory

Python script to download/shallow clone the files of a directory at bitbucket. This is useful when you just want a copy of the files in a subdirectory of a repository without needing mercurial or having to download the entire repository.