Skip to content

Instantly share code, notes, and snippets.

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

Serhii [boonya] Buinytskyi boonya

🏠
Working from home
View GitHub Profile
@BartKrol
BartKrol / haproxy.cfg
Created February 2, 2016 11:34
HAProxy Websockets config
global
maxconn 4096
defaults
mode http
balance roundrobin
option redispatch
option forwardfor
timeout connect 5s
@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

@Dillie-O
Dillie-O / gist:6140774
Last active November 6, 2016 20:14
Mount ReadyShare network drives and TimeMachine sparsebundle script
try
mount volume "smb://readyshare/MacBackup"
end try
do shell script "hdiutil attach -mountpoint /Volumes/MacBackup/ /Volumes/MacBackup/TimeMachine.sparsebundle"
@ogrrd
ogrrd / dnsmasq OS X.md
Last active June 26, 2024 22:36
Setup dnsmasq on OS X

Never touch your local /etc/hosts file in OS X again

To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.

Requirements

Install

@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@pazdera
pazdera / adapter.py
Created August 15, 2011 07:38
Example of `adapter' design pattern in Python
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example of `adapter' design pattern
# Copyright (C) 2011 Radek Pazdera
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.