Skip to content

Instantly share code, notes, and snippets.

View scarabaeus's full-sized avatar
🍹

Steve G. scarabaeus

🍹
  • San Francisco, CA
  • 05:31 (UTC -07:00)
View GitHub Profile
@scarabaeus
scarabaeus / p4merge-as-git-difftool.md
Created January 16, 2022 19:46
Setting p4merge as default git difftool

Download: P4Merge https://www.perforce.com/downloads/visual-merge-tool and only copy P4Merge to /Applications from the dmg.

~ $ git config --global diff.tool p4merge
~ $ git config --global difftool.p4merge.path /Applications/p4merge.app/Contents/MacOS/p4merge
~ $ git config --global difftool.prompt false

If you receive the error message: qt.qpa.fonts: Populating font family aliases took N ms. Replace uses of missing font family "Courier" with one that exists to avoid this cost. run git difftool and in P4Merge > Preferences... > Text Format > Font replace "Courier" with "Consolas".

@KristofferBerge
KristofferBerge / web.config
Last active January 13, 2020 17:15
Configuration file for Azure web app to support angular2 applications with routing and long urls for auth tokens.
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.web>
<httpRuntime maxQueryStringLength="32768" maxUrlLength="65536"/>
</system.web>
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxQueryString="32768"/>
</requestFiltering>
@roboshoes
roboshoes / touchmouse.js
Created April 13, 2012 10:43
This snippet maps mouse events and touch events onto one single event. This makes it easier in the code since you have to listen to only one event regardles whether it's desktop or mobile.
(function() {
/* == GLOBAL DECLERATIONS == */
TouchMouseEvent = {
DOWN: "touchmousedown",
UP: "touchmouseup",
MOVE: "touchmousemove"
}
/* == EVENT LISTENERS == */