Skip to content

Instantly share code, notes, and snippets.

View evansj's full-sized avatar
🏠
Working from home

Jon Evans evansj

🏠
Working from home
View GitHub Profile
@evansj
evansj / git_utils.zsh
Last active June 13, 2019 10:13
Util for adding current git repo name as an iTerm2 user variable so you can use it in a badge
#
# Git repo name badge for zsh and iTerm2
#
## Hook function definitions
function chpwd_git_utils() {
get_repo_basename
}
# Work out the current repo name (the name of the directory that
@evansj
evansj / docker-compose.yml
Created January 10, 2019 14:45
ZNC docker compose
version: "2.1"
services:
znc:
image: znc:latest
restart: always
privileged: false
network_mode: host
ports: # HOST:CONTAINER
- "16697:16697" # IRC
- "6697:6697" # IRC

Keybase proof

I hereby claim:

  • I am evansj on github.
  • I am evansj (https://keybase.io/evansj) on keybase.
  • I have a public key ASCMBAV6kdY4mMkW9ZAhuevrrMMZH_kp29jdhDwihRSftQo

To claim this, I am signing this object:

@evansj
evansj / gist:6087673
Created July 26, 2013 09:49
Use curl to upload files to Alfresco
# this is a quick and dirty way to upload files to an Alfresco instance, useful
# for grabbing logfiles from a server that you can't easily access with scp
curl -k -X POST --user username:password \
-F filedata=@catalina.out.bz2 \
-F siteid=your-site-id \
-F containerid=documentLibrary \
-F uploaddirectory=/logs \
-F filename=catalina.out.bz2 \
-F contenttype="application/x-bzip2" \
@evansj
evansj / request body.xml
Created September 28, 2011 11:15
JIRA / eclipse plugin issue
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<ns1:addWorklogAndAutoAdjustRemainingEstimate
soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns1="http://soap.rpc.jira.atlassian.com">
<in0 xsi:type="xsd:string">********</in0>
<in1 xsi:type="xsd:string">PDD-88</in1>
# put this file in config/initializers
module ActionView
module Helpers
module FormHelper
%w(search email url number range date color).each do |type|
selector = "#{type}_field"
src = <<-end_src
def #{selector}(object_name, method, options = {})
InstanceTag.new(object_name, method, self, options.delete(:object)).to_input_field_tag("#{type}", options)
end