Skip to content

Instantly share code, notes, and snippets.

@saetia
saetia / gist:1623487
Last active May 1, 2024 19:55
Clean Install – OS X 10.11 El Capitan

OS X Preferences


most of these require logout/restart to take effect

# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false

# Set a shorter Delay until key repeat

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@irazasyed
irazasyed / homebrew-permissions-issue.md
Last active June 14, 2024 17:01
Homebrew: Permissions Denied Issue Fix (OS X / macOS)

Homebrew Permissions Denied Issues Solution

sudo chown -R $(whoami) $(brew --prefix)/*

@haggen
haggen / README.md
Last active September 11, 2018 03:19
boot2docker on nfs

Get boot2docker working with nfs instead of vboxsf.

Tested on:

- Boot2Docker-cli version: v1.6.0
  Git commit: 9894ae9
- Boot2Docker-cli version: v1.6.2
  Git commit: cb2c3bc
@chadrien
chadrien / README.md
Last active September 1, 2023 12:43
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
@rivetmichael
rivetmichael / snippets.md
Last active February 28, 2016 01:00
Docker snippet

Backing up data from data container

$ docker run --rm --volumes-from [DATA_CONTAINER_NAME] -v $(pwd):/backup ubuntu tar cvf /backup/backup.tar [/path/to/the/data/to/backup]

Restoring data to data container

$ docker run --rm --volumes-from [DATA_CONTAINER_NAME] -v $(pwd):/backup ubuntu bash -c "cd [/path/to/datadir] && tar xvf /backup/backup.tar --strip 1"
@tejastank
tejastank / fix.wkhtmltopdf.odoo.snippetbucket.erp.open.source.seo.sh
Last active August 14, 2022 18:03
Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display. # https:/…
# https://www.snippetbucket.com/
# ODOO ERP Django PHP Android AngularJS implementation and customization.
# Most Simple and Quick Way:
sudo su
cd /opt
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
mv wkhtmltox/bin/wkhtmlto* /usr/bin/
@zeke
zeke / github_gmail.sh
Last active August 8, 2019 22:17
Create a standalone GitHub Gmail OS X client using electron nativefier
npm install -g node-icns nativefier
curl -o cat.png https://octodex.github.com/images/adventure-cat.png
nicns --in cat.png --out cat.icns
echo "console.log('whoa script injection')" > inject.js
nativefier --name "GitHub Gmail" --icon cat.icns --inject inject.js https://inbox.google.com
rm -rf /Applications/GitHub\ Gmail.app
mv GitHub\ Gmail-darwin-x64/GitHub\ Gmail.app /Applications/
open /Applications/GitHub\ Gmail.app
@remarkablemark
remarkablemark / Dockerfile
Last active June 18, 2024 04:42
Install node and npm with nvm using Docker.
# set the base image to Debian
# https://hub.docker.com/_/debian/
FROM debian:latest
# replace shell with bash so we can source files
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# update the repository sources list
# and install dependencies
RUN apt-get update \
@tomysmile
tomysmile / mac-setup-redis.md
Last active May 23, 2024 03:17
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis