Skip to content

Instantly share code, notes, and snippets.

@ohshhh
ohshhh / spotify hosts
Created December 15, 2017 20:45
spotify hosts
127.0.0.1 adclick.g.doublecklick.net
127.0.0.1 adeventtracker.spotify.com
127.0.0.1 ads-fa.spotify.com
127.0.0.1 analytics.spotify.com
127.0.0.1 audio2.spotify.com
127.0.0.1 b.scorecardresearch.com
127.0.0.1 bounceexchange.com
127.0.0.1 bs.serving-sys.com
127.0.0.1 content.bitsontherun.com
@ohshhh
ohshhh / Get vagrant box guest IP from host
Created November 14, 2017 21:08
Get vagrant box guest IP from host
Get vagrant box guest IP from host
VAGRANT IP
vagrant ssh -c "hostname -I | cut -d' ' -f2" 2>/dev/null
(OS X): copy it to clipboad
vagrant ssh -c "hostname -I | cut -d' ' -f2" 2>/dev/null | pbcopy
@ohshhh
ohshhh / karabiner-elements complex config
Last active October 29, 2017 14:18
karabiner-elements complex config
"complex_modifications": {
"rules": [
{
"manipulators": [
{
"description": "Ctrl+Tab to Cmd+Tab",
"from": {
"key_code": "tab",
"modifiers": {
"mandatory": [
@ohshhh
ohshhh / clean-docker-for-mac.sh
Created August 30, 2017 18:58 — forked from MrTrustor/clean-docker-for-mac.sh
This script cleans the Docker.qcow2 file that takes a lot of disk space with Docker For Mac. You can specify some Docker images that you would like to keep.
#!/bin/bash
# Copyright 2017 Théo Chamley
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in the Software
# without restriction, including without limitation the rights to use, copy, modify, merge,
# publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
# to whom the Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all copies or
@ohshhh
ohshhh / kubernetes_on_macOS.md
Created January 21, 2017 07:19 — forked from kevin-smets/1_kubernetes_on_macOS.md
Local Kubernetes setup on macOS with minikube on VirtualBox

Requirements

Minikube requires that VT-x/AMD-v virtualization is enabled in BIOS. To check that this is enabled on OSX / macOS run:

sysctl -a | grep machdep.cpu.features | grep VMX

If there's output, you're good!

Prerequisites

@ohshhh
ohshhh / pedantically_commented_playbook.yml
Created January 21, 2017 04:33 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.
@ohshhh
ohshhh / logrotate.markdown
Created February 16, 2016 23:58 — forked from mattyoho/logrotate.markdown
Logrotate

Install

brew install logrotate

add to .bash_profile

export PATH=${PATH}:/usr/local/sbin

restart terminal just to check the logrotate command returns something

logrotate -?

make logrotate.d directory inside of /etc/ and add new config file

@ohshhh
ohshhh / osx-for-hackers.sh
Created February 5, 2016 21:10 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@ohshhh
ohshhh / symfony 3 bundles status
Created January 26, 2016 12:05
Symfony 3 bundles status
https://docs.google.com/spreadsheets/d/1GOxJ2lNpLxN12YyZ87Bhsxb0iLAQ7e4UDZbJSly8Sy8/edit#gid=0
@ohshhh
ohshhh / osx_ramdisk.sh
Last active November 9, 2016 13:10 — forked from jnschulze/osx_ramdisk.sh
RamDisk Usage OSX
#!/bin/bash
# Size at the end is * 2048 where 2048 = 1 MB, so 1572864 = 768 MB
#DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://1572864`
DISK=`/usr/bin/hdiutil attach -nobrowse -nomount ram://2097152`
/usr/sbin/diskutil erasevolume HFS+ "RamDiskCache" $DISK
CACHEDIR="/Volumes/RamDiskCache/$USER"