Skip to content

Instantly share code, notes, and snippets.

View dotemacs's full-sized avatar

Александар Симић dotemacs

View GitHub Profile

Speakers and availabilty

Waiting on reply

Sean O’Halpin

Leonidas Tsampros

Steve Mynott

Thomas Koch

Ben Hsu

Ryan Davis

Jimeh

@dotemacs
dotemacs / gist:5084820
Last active December 14, 2015 12:18
Emacs Conf Lightning talks

Wanna do a talk at Emacs Conf?

Add yourself to the list below and give a short blurb about the topic. Go wild!

About something interesting (placeholder)

by Dave Nolan

@dotemacs
dotemacs / opendetex-2.8.1-Makefile-homebrew.patch
Created March 8, 2013 23:05
opendetex-2.8.1 diffs for Homebrew
--- Makefile.orig 2013-03-08 21:18:51.000000000 +0000
+++ Makefile 2013-03-08 22:51:46.000000000 +0000
@@ -130,8 +130,10 @@
# install -c -m 775 -o binary -g staff -s detex ${DESTDIR}
# rm -f ${DESTDIR}/delatex
# ln ${DESTDIR}/detex ${DESTDIR}/delatex
- sudo install detex /usr/local/bin
- sudo install detex /usr/local/bin/delatex
+ mkdir -p ${DESTDIR}/{bin,share/man/man1}
+ install detex ${DESTDIR}/bin
require 'formula'
class Opendetex < Formula
homepage 'https://code.google.com/p/opendetex/'
url 'https://opendetex.googlecode.com/files/opendetex-2.8.1.tar.bz2'
sha1 'd62d39d383eec66ba945090616d1d10b853a98fb'
def install
inreplace "Makefile", "/usr/local/bin", prefix
system "make", "install"
#!/usr/bin/env ruby
#/ Usage: <progname> [options]...
#/ How does this script make my life easier?
# ** Tip: use #/ lines to define the --help usage message.
$stderr.sync = true
require 'optparse'
# default options
flag = false
option = "default value"
;; clean this up and 'package it' nicely
(defun beautify-json ()
"taken from jstevenco http://stackoverflow.com/revisions/7934783/2"
(interactive)
(let ((b (if mark-active (min (point) (mark)) (point-min)))
(e (if mark-active (max (point) (mark)) (point-max))))
(shell-command-on-region b e
;; "python -c 'import sys,json; data=json.loads(sys.stdin.read()); print json.dumps(data,sort_keys=True,indent=4).decode(\"unicode_escape\").encode(\"utf8\",\"replace\")'"
;; (current-buffer) t)))
"~/bin/jsonfmt" (current-buffer) t)))
require 'savon'
# setup
auth = {
"company" => "yes",
"username" => "aha",
"password" => "secret"
}
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="urn:callcredit.co.uk/soap:callreport7">
<soapenv:Header>
<soap:callcreditheaders>
<soap:company>COMPANY</soap:company>
<soap:username>USERNAME</soap:username>
<soap:password>PASSWORD</soap:password>
</soap:callcreditheaders>
</soapenv:Header>
<soapenv:Body>
</soapenv:Body>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>An internal system error has occurred</faultstring>
<faultactor>https://ct.callcreditsecure.co.uk/Services/CallReport/callreport7.asmx</faultactor>
<detail/>
</soap:Fault>
</soap:Body>
</soap:Envelope>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Invalid request. The schema validation check has failed
The element 'callcreditheaders' in namespace 'urn:callcredit.co.uk/soap:callreport7' has invalid child element 'company' in namespace 'http://schemas.xmlsoap.org/soap/envelope/'. List of possible elements expected: 'company' in namespace 'urn:callcredit.co.uk/soap:callreport7'.</faultstring>
<faultactor>https://ct.callcreditsecure.co.uk/Services/CallReport/callreport7.asmx</faultactor>
<detail/>
</soap:Fault>
</soap:Body>