Skip to content

Instantly share code, notes, and snippets.

View strayer's full-sized avatar
🇺🇦
🕊

Sven Grunewaldt strayer

🇺🇦
🕊
View GitHub Profile
@kiliankoe
kiliankoe / NeverAirpods.swift
Created January 17, 2021 00:47
Never let macOS use my AirPods as an input device
import Foundation
import ShellOut
do {
try shellOut(to: "SwitchAudioSource -a")
} catch {
print("Couldn't find SwitchAudioSource.")
print("Please install switchaudio-osx via homebrew.")
exit(1)
}
@ck-on
ck-on / ocp.php
Last active March 25, 2024 09:30
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)#ocp #php #opcache #opcode #cache #zend #optimizerplus #optimizer+
<?php
/*
OCP - Opcache Control Panel (aka Zend Optimizer+ Control Panel for PHP)
Author: _ck_ (with contributions by GK, stasilok)
Version: 0.1.7
Free for any kind of use or modification, I am not responsible for anything, please share your improvements
* revision history
0.1.7 2015-09-01 regex fix for PHP7 phpinfo
0.1.6 2013-04-12 moved meta to footer so graphs can be higher and reduce clutter
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active April 25, 2024 06:23
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jlesquembre
jlesquembre / postmkvirtualenv
Created March 15, 2012 08:12
Creates a symlink to PyQt libraries when a new virtual environment is created
#!/bin/bash
# This hook is run after a new virtualenv is activated.
# ~/.virtualenvs/postmkvirtualenv
libs=( PyQt4 sip.so )
python_version=python$(python -c "import sys; print (str(sys.version_info[0])+'.'+str(sys.version_info[1]))")
var=( $(which -a $python_version) )
get_python_lib_cmd="from distutils.sysconfig import get_python_lib; print (get_python_lib())"