Skip to content

Instantly share code, notes, and snippets.

View dexit's full-sized avatar
🎯
Focusing

Rihards Mantejs dexit

🎯
Focusing
View GitHub Profile
# custom login link
RewriteRule ^login$ http://localhost/whitelabel/wp-login.php [NC,L]
@benvanik
benvanik / pyramiddemo.html
Created December 14, 2011 06:06
Simple Image Pyramid Demo
<!DOCTYPE html>
<html>
<head>
<title>Image Pyramid Demo</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0,user-scalable=no">
<script src="pyramiddemo.js"></script>
<style>
body {
@hakre
hakre / dl-file.php
Created January 2, 2012 21:41
Wordpress login to download uploaded files
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
@jimmygle
jimmygle / PHP-Recursive-Implosion.php
Last active June 20, 2024 22:01
PHP function to recursively implode multi-dimensional arrays.
<?php
/**
* Recursively implodes an array with optional key inclusion
*
* Example of $include_keys output: key, value, key, value, key, value
*
* @access public
* @param array $array multi-dimensional array to recursively implode
* @param string $glue value that glues elements together
@bradgessler
bradgessler / posterous-importer.php
Created July 27, 2012 00:01
Posterous WordPress importer (this one makes sure that the links don't break)
<?php
/*
Plugin Name: Posterous Importer
Plugin URI: http://wordpress.org/extend/plugins/posterous-importer/
Description: Import posts, comments, tags, and attachments from a Posterous.com blog.
Author: Automattic, Brian Colinger, Peter Westwood, Daryl L. L. Houston
Author URI: http://automattic.com/
Version: 0.10
License: GPL v2 - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*/
@finnjohnsen
finnjohnsen / UDPListenerService
Created September 6, 2012 11:18
Android UDP Broadcast listener service
package no.nsb.ombord;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;
import org.apache.http.util.ExceptionUtils;
@brasofilo
brasofilo / install.php
Last active September 3, 2023 20:24
WP Install Defaults - Dropin Plugin
<?php
!defined( 'ABSPATH' ) AND exit;
/*
Plugin Name: Custom Installation Script
Plugin URI: http://wordpress.stackexchange.com/q/75420/12615
Description: Create our own content on WP install
License: GPL
*/
@ankitnetwork18
ankitnetwork18 / gist:4508696
Created January 11, 2013 07:26
wordpress: import data into wordpress from rss/xml data
/*
* This is wordpress API for importing latest news from cnn ibn
* http://localhost/Sandbox/wordpress/wp-content/plugins/data_import/import_news18_images.php
*/
//load wordpress functions
require_once("../../../wp-load.php");
include 'functions.php';
/**
@wpscholar
wpscholar / replace-wp-dashboard.php
Last active June 25, 2024 08:31
Replace the default WordPress dashboard with a custom one
<?php
/**
* Plugin Name: Replace WordPress Dashboard
* Description: Replaces the default WordPress dashboard with a custom one.
* Author: Micah Wood
* Author URI: http://micahwood.me
* Version: 0.1
* License: GPL3
*/
@GaryJones
GaryJones / wp-prep.php
Created February 27, 2013 23:54
Refactor of wp-prep (https://github.com/jaredatch/wp-prep/blob/master/wp-prep.php). Completely untested.
<?php
/**
* WordPress Prep.
*
* Based from the WordPress Downloader
* http://www.farinspace.com/wordpress-downloader/
*
* @package wordpress-prep
* @version 1.0.1
* @author Jared Atchison