Skip to content

Instantly share code, notes, and snippets.

View edwardsmit's full-sized avatar

Edward Smit edwardsmit

View GitHub Profile
@karmi
karmi / nginx-elasticsearch-proxy.conf
Created May 23, 2011 08:16
Route requests to ElasticSearch to authenticated user's own index with an Nginx reverse-proxy
# 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:8080/_search?q=*
#
# is rewritten to:
#
@karmi
karmi / elastic_search_ngram_analyzer_for_urls.sh
Created May 24, 2011 15:32
NGram Analyzer in ElasticSearch
# ========================================
# Testing n-gram analysis in ElasticSearch
# ========================================
curl -X DELETE localhost:9200/ngram_test
curl -X PUT localhost:9200/ngram_test -d '
{
"settings" : {
"index" : {
"analysis" : {
@phillro
phillro / gist:1126799
Created August 5, 2011 02:19
Easy Document Searching with Jquery, jquery-templates and Elastic Search
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title></title>
</head>
<body>
<script id="searchResultTemplate" type="text/x-jquery-tmpl">
{{each(i,result) hits}}
@leonardofed
leonardofed / README.md
Last active July 11, 2024 02:18
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@tednaleid
tednaleid / gist:0982b620a022346a34d24a961c5bb517
Created June 15, 2017 00:29
karabiner 0.91.3 caps lock to ctrl when chorded or esc when pressed alone
// modified from http://brettterpstra.com/2017/06/14/full-hyper-key-functionality-restored-in-sierra/
// this makes caps lock turn into "left control" if pressed with another key
// and "escape" if pressed by itself. Requires karabiner elements 0.91.3 or higher to have
// the "to_if_alone" section. Place after "simple_modifications" in the ~/.config/karabiner/karabiner.json file
"complex_modifications": {
"rules": [
{
"manipulators": [
{
"description": "Change caps_lock to command+control+option+shift. Escape if no other key used.",