Skip to content

Instantly share code, notes, and snippets.

@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active May 5, 2024 00:12
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@Shelob9
Shelob9 / mini-rest-api-get-client.php
Created August 25, 2014 02:08
Example code, packaged as a plugin for my Torque article on getting posts via GET requests using the WordPress REST API. http://torquemag.io/?p=72403
<?php
/*
Plugin Name: JP Mini REST API GET Client
Plugin URI: http://torquemag.io/?p=72403
Description: A min client for making GET requests via the WordPress REST API.
Version: 0.1.1
Author: Josh Pollock
Author URI: http://JoshPress.net
License: GPL v2 or later
*/
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch
@dwayne
dwayne / 00-ionic-notes.md
Last active October 13, 2022 15:05
My notes on the Ionic Framework.
@devinsays
devinsays / custom_edd_sl_license_response
Last active August 29, 2015 14:02
Allow "Package" downloads. Multiple file downloads using the same license.
/**
* This code requires one additional filter param to be added to edd_sl_license_response in EDD_Software_Licensing.php:
* $response = apply_filters( 'edd_sl_license_response', $params, $download, $data)
*/
/**
* Allows EDD to bypass the name check for files
*/
define( 'EDD_BYPASS_NAME_CHECK', true );
@soheilhy
soheilhy / nginxproxy.md
Last active May 7, 2024 14:55
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 2, 2024 05:49
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@MikeNGarrett
MikeNGarrett / redirect-wp-multisite-activation.php
Last active August 25, 2021 16:00
Redirect WordPress Multisite User Upon Activation
<?php
// add do_action('my_do_active_user_message_hook'); where you want the welcome message to display after redirect
add_action( 'activate_header', 'check_activation_key_redirect_to_page' );
/**
* Check the wp-activate key and redirect the user to the apply page
* based on http://www.vanbodevelops.com/tutorials/how-to-skip-the-activation-page-and-send-the-user-straight-to-the-home-page-for-wordpress-multisite
*/
function check_activation_key_redirect_to_page() {
// We check if the key is not empty
@macbleser
macbleser / wp-permissions-script
Created February 21, 2014 15:37
WordPress Permissions Configuration Script
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro
#
WP_OWNER=changeme # &lt;-- wordpress owner
WP_GROUP=changeme # &lt;-- wordpress group
WP_ROOT=/home/changeme # &lt;-- wordpress root directory