Skip to content

Instantly share code, notes, and snippets.

:octocat:
githubing

coliver

:octocat:
githubing
Block or report user

Report or block coliver

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View DefaultKeyBinding.dict
/* This file goes in ~/Library/KeyBindings */
{
/* Remap Home / End keys */
/* Home Button*/
"\UF729" = "moveToBeginningOfLine:";
/* End Button */
"\UF72B" = "moveToEndOfLine:";
/* Shift + Home Button */
"$\UF729" = "moveToBeginningOfLineAndModifySelection:";
/* Shift + End Button */
@coliver
coliver / net_ntlm_monkeypatch.rb
Created Feb 27, 2019 — forked from antoniusostermann/net_ntlm_monkeypatch.rb
A monkey patch to solve the problem described in https://github.com/savonrb/httpi/issues/139. This monkey patch prioritizes ntlm over negotiate and makes it possible to use the httpi gem if server supports both / sends header including both arguments.
View net_ntlm_monkeypatch.rb
# A monkey patch concerning this issue: https://github.com/savonrb/httpi/issues/139
# Basically, this monkey patch priors NTLM over Negotiate and not vice-versa
# All monkey patched spots are marked with "## MONKEY PATCHED"
# All in all, there are 2 monkey patched spots, both in private method "negotiate_ntlm_auth"
# Compare it with: https://github.com/savonrb/httpi/blob/d6a3825a8e896f794e54b634c39521e6956f72ff/lib/httpi/adapter/net_http.rb
require "uri"
require "httpi/adapter/base"
require "httpi/response"
@coliver
coliver / rubyntlm_with_net_http.rb
Created Feb 20, 2019 — forked from rodrei/rubyntlm_with_net_http.rb
Example: NTLM Authentication with NetHTTP
View rubyntlm_with_net_http.rb
uri = URI('https://host.com/ews/exchange.asmx')
user = ''
passwd = ''
Net::HTTP.start(uri.host, uri.port, :use_ssl => uri.scheme == 'https') do |http|
request = Net::HTTP::Get.new(uri.request_uri)
t1 = Net::NTLM::Message::Type1.new()
request['Authorization'] = 'NTLM ' + t1.encode64
response = http.request(request)
@coliver
coliver / FixinSchema.md
Created Feb 21, 2018
How to fix a schema.rb conflict after a rebase
View FixinSchema.md
@coliver
coliver / HowToGetAWebcamWorkingInAVM.md
Last active Apr 26, 2016
How to get a webcam working in a Windows 10 VM
View HowToGetAWebcamWorkingInAVM.md

Tested in VirtualBox 5.0.18

Linux Mint 17 Qiana host

Win10 guest

Ensure the VM boots up, windows update, install guest additions, shut down

  • Open VirtualBox
View rspec-mocks-to-mocha.rb
# I use RubyMine. In the find and replace box:
find: expect\((.*)\)\.to receive\((.*)\)(\.with\(.*\))?.and_return
replace: $1.expects($2).returns(
# This does most of the work.
View highfive_on_genymotion.sh
# Install genymotion
https://www.genymotion.com/
# Install Android SDK
# Download Genymotion-ARM-Translation v1.1
# Google it
# Genymotion:
# Using Google Nexus 7 - 4.3 - API 18 VM
View ubuntu14.04-command-line-install-android-sdk
# install openjdk
sudo apt-get install openjdk-7-jdk
# download android sdk
http://dl.google.com/android/android-sdk_r24.2-linux.tgz
tar -xvf android-sdk_r24.2-linux.tgz
cd android-sdk-linux/tools
# install all sdk packages
View jameswhitemanifesto.txt
== Rules ==
On Infrastructure
-----------------
There is one system, not a collection of systems.
The desired state of the system should be a known quantity.
The "known quantity" must be machine parseable.
The actual state of the system must self-correct to the desired state.
The only authoritative source for the actual state of the system is the system.
The entire system must be deployable using source media and text files.
@coliver
coliver / describe_security_groups
Created Nov 14, 2012
Example xml returned from fog with juicy info removed.
View describe_security_groups
<?xml version="1.0" encoding="UTF-8"?>
<DescribeSecurityGroupsResponse xmlns="http://ec2.amazonaws.com/doc/2012-07-20/">
<requestId>REDACTED</requestId>
<securityGroupInfo>
<item>
<ownerId>REDACTED</ownerId>
<groupId>REDACTED</groupId>
<groupName>REDACTED</groupName>
<groupDescription>REDACTED</groupDescription>
<ipPermissions/>
You can’t perform that action at this time.