Skip to content

Instantly share code, notes, and snippets.

View koconder's full-sized avatar
:octocat:

Vincent Koc koconder

:octocat:
View GitHub Profile
#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
// Don't disable on dev
if ( ! defined( 'WP_DEBUG' ) || ! WP_DEBUG ) {
// Disable core update checking
add_filter( 'pre_site_transient_update_core', create_function( '$a', "return null;" ) );
remove_action( 'admin_init', '_maybe_update_core' );
remove_action( 'wp_version_check', 'wp_version_check' );
backend default {
.host = "127.0.0.1";
.port = "8080";
}
acl purge {
"localhost",
"69.195.222.132"
}
sub vcl_recv {
@koconder
koconder / json_to_csv.html
Last active January 14, 2019 23:08 — forked from palesz/json_to_csv.html
Simple JSON to CSV in HTML and Javascript with External Libraries
<html>
<head>
<style>
textarea {
height: 300px;
width: 100%;
}
</style>
<script type="text/javascript">
@koconder
koconder / sample.php
Created February 7, 2013 12:59 — forked from zaru/sample.php
<?php
//検索キーワード
$keyword = 'アプリ';
$uri = 'http://ax.search.itunes.apple.com/WebObjects/MZSearch.woa/wa/search?term=' . urlencode($keyword) . '&media=software';
$context = stream_context_create(array('http' => array(
'method' => 'GET',
'header' =>
'User-Agent: iTunes-iPhone/4.2.1 (2; 8GB)' . "\r\n"
. 'X-Apple-Store-Front: 143462-9,2' . "\r\n"