Skip to content

Instantly share code, notes, and snippets.

@syohex
syohex / ginger-api.el
Created April 25, 2013 05:40
ginger API from Emacs
(require 'request) ;; https://github.com/tkf/emacs-request
(require 'json)
(defvar ginger-end-point
"http://services.gingersoftware.com/Ginger/correct/json/GingerTheText" )
;;;###autoload
(defun ginger-region (beg end)
(interactive "r")
(lexical-let* ((text (buffer-substring-no-properties beg end))
anonymous
anonymous / config
Created January 2, 2018 16:35
ssh config
Host *+*
ProxyCommand ssh $(echo %h | sed 's/+[^+]*$//;s/\([^+%%]*\)%%\([^+]*\)$/\2 -l \1/;s/:/ -p /') nc -w1 $(echo %h | sed 's/^.*+//;/:/!s/$/ %p/;s/:/ /')
@zwrss
zwrss / mappings_and_data
Created March 15, 2013 11:29
ElasticSearch tree structure search.
#!/bin/sh
echo
curl -XDELETE 'http://localhost:9200/products'
echo
curl -XPUT 'localhost:9200/products' -d '
{
"mappings" : {
"Root" : {
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bryantrobbins
bryantrobbins / Jenkins Slave Dockerfile
Last active September 14, 2020 00:01
Docker jenkins and nexus example
FROM ubuntu:12.04
MAINTAINER Bryan Robbins <bryantrobbins@gmail.com>
# Get latest packages
RUN apt-get update && apt-get clean
# Needed for Jenkins
RUN apt-get install --no-install-recommends openjdk-7-jdk -y
# Needed for Jenkins jobs
@teropa
teropa / resources.md
Last active December 4, 2020 05:42
Clojure Resources

Tutorials

@skroah
skroah / gist:9c22697521626c7b388b
Last active May 10, 2021 03:50
Reactive Systems Design

##Reactive System Design Links

#Articles and Papers

version: '3'
services:
portainer:
image: portainer/portainer:latest
container_name: portainer
restart: unless-stopped
security_opt:
- no-new-privileges:true
networks:
@iamatypeofwalrus
iamatypeofwalrus / tabCompleter.py
Created May 23, 2013 17:38
A simple Python Tab Completer for either system paths OR lists.
import os
import sys
import readline
import glob
class tabCompleter(object):
"""
A tab completer that can either complete from
the filesystem or from a list.
let s:endpoint = 'http://services.gingersoftware.com/Ginger/correct/json/GingerTheText'
let s:apikey = '6ae0c3a0-afdc-4532-a810-82ded0054236'
function! s:ginger(text)
let res = webapi#json#decode(webapi#http#get(s:endpoint, {
\ 'lang': 'US',
\ 'clientVersion': '2.0',
\ 'apiKey': s:apikey,
\ 'text': a:text}).content)
let i = 0
let correct = ''