One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
#301 Redirects for .htaccess | |
#Redirect a single page: | |
Redirect 301 /pagename.php http://www.domain.com/pagename.html | |
#Redirect an entire site: | |
Redirect 301 / http://www.domain.com/ | |
#Redirect an entire site to a sub folder | |
Redirect 301 / http://www.domain.com/subfolder/ |
<?php | |
/** | |
* Get posts in range date by a specific custom field(post meta) | |
* But, the date needs to be in the format YYYYMMDD | |
* | |
* @param string $start start date | |
* @param string $end end date | |
* @param string $field specific custom field | |
* @param string $ctype |
/* open up chrome dev tools (Menu > More tools > Developer tools) | |
* go to network tab, refresh the page, wait for images to load (on some sites you may have to scroll down to the images for them to start loading) | |
* right click/ctrl click on any entry in the network log, select Copy > Copy All as HAR | |
* open up JS console and enter: var har = [paste] | |
* (pasting could take a while if there's a lot of requests) | |
* paste the following JS code into the console | |
* copy the output, paste into a text file | |
* open up a terminal in same directory as text file, then: wget -i [that file] | |
*/ |
<?php | |
// adds checkbox to make link a button | |
function add_class_wplink() { | |
wp_deregister_script( 'wplink' ); | |
wp_register_script( 'wplink', get_template_directory_uri() . '/js/admin/wplink.js', array( 'jquery', 'wpdialogs' ), false, 1 ); | |
wp_localize_script( 'wplink', 'wpLinkL10n', array( | |
'title' => __('Insert/edit link'), | |
'update' => __('Update'), |
<?php namespace Admin\Http\Controllers\Admin; | |
use Admin\Http\Requests\Admin\UserRequest; | |
use Admin\Http\Controllers\Controller; | |
use Admin\Repositories\RoleRepository; | |
use Admin\Repositories\UserRepository; | |
use Admin\User; | |
use Illuminate\Http\Request; | |
use Illuminate\Database\Eloquent\Collection as EloquentCollection; | |
use Illuminate\Pagination\AbstractPaginator as Paginator; |
#!/usr/bin/env bash | |
# This is designed to get a CentOS 7 system up and running | |
# from absolutely nothing. It will install the LAMP stack | |
# as well as RVM and Phusion Passenger | |
# Run this as root | |
yum update |
# first we download the list of IP ranges from CloudFlare | |
wget https://www.cloudflare.com/ips-v4 | |
# set the security group ID | |
SG_ID="sg-00000000000000" | |
# iterate over the IP ranges in the downloaded file | |
# and allow access to ports 80 and 443 | |
while read p | |
do |
The command line, in short…
wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/
…and the options explained
#!/bin/bash | |
# This script should be located on each Jenkins slave, and the jenkins user should have permission to run it with sudo | |
# Attempts to cleanly stop and remove all containers, volumes and images. | |
docker ps -q | xargs --no-run-if-empty docker stop | |
docker ps -q -a | xargs --no-run-if-empty docker rm --force --volumes | |
docker volume ls -q | xargs --no-run-if-empty docker volume rm | |
docker images -a -q | xargs --no-run-if-empty docker rmi -f | |
# Stops the docker service, unmounts all docker-related mounts, removes the entire docker directory, and starts docker again. |