Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View abrudtkuhl's full-sized avatar
🥓

Andy Brudtkuhl abrudtkuhl

🥓
View GitHub Profile
@abrudtkuhl
abrudtkuhl / nginx-elasticsearch-proxy.conf
Last active August 23, 2019 01:33 — forked from karmi/nginx-elasticsearch-proxy.conf
NGINX Reverse Proxy Authentication For Elasticsearch
# Run me with:
#
# $ nginx -p /path/to/this/file/ -c nginx.conf
#
# All requests are then routed to authenticated user's index, so
#
# GET http://user:password@localhost/_search?q=*
#
# is rewritten to:
#
@abrudtkuhl
abrudtkuhl / web.config
Created June 30, 2014 22:42
WordPress on IIS Web.config to use permalinks
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Main Rule" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
@abrudtkuhl
abrudtkuhl / es.sh
Last active August 29, 2015 13:58
Install Elastic Search On Ubuntu
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre-headless -y
wget https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.2.2.deb
sudo dpkg -i elasticsearch-1.2.2.deb
sudo service elasticsearch start
#curl http://localhost:9200
<?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
*/
@abrudtkuhl
abrudtkuhl / comments.php
Created August 8, 2012 18:05
WordPress comments.php for Responsive Facebook Comments
<div class="fb-comments"data-href="<?php the_permalink(); ?>" data-num-posts="2" mobile="false"></div>
@abrudtkuhl
abrudtkuhl / responsive-facebook-comments.css
Created August 8, 2012 18:01
Responsive Facebook Comments CSS
/* facebook comments */
.fb-comments, .fb-comments iframe[style], .fb-like-box, .fb-like-box iframe[style] {width: 100% !important;}
.fb-comments span, .fb-comments iframe span[style], .fb-like-box span, .fb-like-box iframe span[style] {width: 100% !important;}
@abrudtkuhl
abrudtkuhl / Github OAuth ASP.Net MVC
Created June 26, 2012 14:34
Github OAuth callback for ASP.Net MVC. Set yourapp.com/github/callback as the OAuth callback URL when you setup your application. If the users chooses to grant you permission, this controller/action get called to complete the transaction. See http://devel
public class GithubController : Controller
{
/// <summary>
/// Github OAuth Callback
/// </summary>
/// <param name="code"></param>
/// <returns></returns>
public JsonResult callback(string code)
{
var clientId = "[insert yours]";
@abrudtkuhl
abrudtkuhl / .gitignore
Created February 23, 2012 03:04 — forked from redoPop/.gitignore
Template .gitignore file for WordPress projects
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your