Skip to content

Instantly share code, notes, and snippets.

View craiglondon's full-sized avatar

Craig London craiglondon

View GitHub Profile
@smac89
smac89 / .gitconfig
Last active June 21, 2017 15:59
Gitconfig settings to use p4merge on windows using Cygwin terminal
[merge]
tool = p4merge
[mergetool "p4merge"]
path = "C:/PROGRA~1/Perforce/p4merge.exe"
[mergetool]
keepBackup = false
trustExitcode = false
[diff]
tool = p4merge
@mems
mems / README.md
Last active March 27, 2018 05:20
Fix AdressBook errors in OSX 10.11 (fixed in OSX 10.12)

For /var/log/system.log full of errors like these ones:

kernel[0]: Sandbox: com.apple.Addres(XXXXX) deny(1) network-outbound /private/var/run/mDNSResponder
com.apple.AddressBook.InternetAccountsBridge[XXXXX]: dnssd_clientstub ConnectToServer: connect()-> No of tries: 1
com.apple.AddressBook.InternetAccountsBridge[XXXXX]: dnssd_clientstub ConnectToServer: connect() failed path:/var/run/mDNSResponder Socket:4 Err:-1 Errno:1 Operation not permitted

How to fix it?

@davebarnwell
davebarnwell / brew-dnsmasq.md
Last active May 3, 2024 10:13
install dnsmasq with brew

Install dnsmasq and configure for *.dev.local domains

$ brew install dnsmasq
$ vim /usr/local/etc/dnsmasq.conf

Reload configuration and clear cache

# Copy the daemon configuration file into place.
$ sudo cp $(brew list dnsmasq | grep /homebrew.mxcl.dnsmasq.plist$) /Library/LaunchDaemons/

$ sudo launchctl unload /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist

@darisi
darisi / Gruntfile.js
Last active September 14, 2019 20:14
Uncss setting with grunt examples
uncss: {
dist: {
options: {
ignore: [
/(#|\.)fancybox(\-[a-zA-Z]+)?/,
/expanded/,
/js/,
/wp-/,
/align/,
/admin-bar/,
@MCF
MCF / sqlsrv_test.php
Last active July 24, 2023 03:05
PDO sqlsrv PHP driver, connect and query SQL Server database - reduced test case.
<?php
$serverName = "sqlserver.example.com";
$database = "myDbName";
$uid = 'sqlserver_username';
$pwd = 'password';
try {
$conn = new PDO(
"sqlsrv:server=$serverName;Database=$database",
$uid,
@madsen
madsen / README.md
Last active June 18, 2019 06:33
Patch Asterisk to allow verifying Twilio's secure SIP trunking

Twilio Secure Trunking with Asterisk

Twilio now allows TLS & SRTP connections with their Elastic SIP Trunking. However, there are some issues with the way they've done it that prevent Asterisk from being able to verify their server's certificate.

First of all, their documentation tells you to download the Thawte Primary Root CA, when the certificate I saw was signed with the

@amolofos
amolofos / modern.ie.vms.json
Last active November 30, 2021 19:15
modern.ie json dataset
<script>
var edgePortal = window.edgePortal || {};
edgePortal.vms = {
"id":"20150817",
"releaseNotes":"http://az792536.vo.msecnd.net/vms/release_notes_license_terms_8_1_15.pdf",
"osList":[{
"osName":"Windows",
"softwareList":[{
"softwareName":"HyperV_2008R2",
"browsers":[{
@wosephjeber
wosephjeber / ngrok-installation.md
Last active May 6, 2024 20:19
Installing ngrok on Mac

Installing ngrok on OSX

For Homebrew v2.6.x and below:

brew cask install ngrok

For Homebrew v2.7.x and above:

@mems
mems / gist:d54ad804d8d8d17d0011
Last active October 24, 2022 03:24
Found the Apple live stream URL
  1. Open http://www.apple.com/live/ which redirect to something like http://www.apple.com/live/2015-june-event/
  2. Find a loaded script like: /live/2015-june-event/scripts/2015-june-event.built.js
  3. Open this script and search p.events-delivery.apple.com.edgesuite.net You find something like http://p.events-delivery.apple.com.edgesuite.net/15pijbnaefvpoijbaefvpihb06/js_files/event
  4. append to it /url.json (details: host + path + url.json)
  5. Open the generated URL
  6. Found an URL like http://p.events-delivery.apple.com.edgesuite.net/15pijbnaefvpoijbaefvpihb06/m3u8/hls_mvp.m3u8

Now you can watch it in VLC or any other videoplayer that support M3U and MP4(H264+AAC)!

@joecampo
joecampo / Connecting PHP 5.6 to MSSQL.md
Last active June 4, 2022 14:20
Connecting PHP 5.6 to MSSQL - Ubuntu (Debian) w/ Apache