A ZSH theme optimized for people who use:
- Solarized
- Git
- Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)
For Mac users, I highly recommend iTerm 2 + Solarized Dark
<?php | |
use Doctrine\ORM\EntityManager, | |
Doctrine\ORM\Configuration, | |
Doctrine\ORM\Mapping\ClassMetadata; | |
/** | |
* Active Entity trait | |
* | |
* Limitations: a class can only ever be assocaited with ONE active entity manager. Multiple entity managers |
wget http://pecl.php.net/get/xhprof-0.9.2.tgz | |
tar -xzf xhprof-0.9.2.tgz | |
cd xhprof-0.9.2/extension | |
/Applications/MAMP/bin/php/php5.3.6/bin/phpize | |
./configure | |
make | |
cp modules/xhprof.so $(/Applications/MAMP/bin/php/php5.3.6/bin/php-config --extension-dir)/ | |
echo "extension=xhprof.so" >> /Applications/MAMP/bin/php/php5.3.6/conf/php.ini |
#! /bin/sh | |
# | |
# run as current user | |
# > mkdir ~/.phpenv/init | |
# > vim 5.3.19 | |
# | |
# before, you should edit php-fpm.conf | |
# and comment out [www] user and group. | |
PHP_BASE=$HOME/.phpenv/versions/{version} |
# hhvm --mode daemon -vServer.Type=fastcgi -vServer.Port=9001 --config /etc/hhvm.hdf | |
PidFile = /var/run/hhvm.pid | |
ServerVariables { | |
ENVIRONMENT = DEVELOPMENT | |
} | |
Log { | |
UseLogFile = true |
#!/bin/sh | |
# cloudflareddns.sh - dynamic dns updater module for Synology | |
# | |
# Author: | |
# Michael Wildman (http://mwild.me) | |
# | |
# Version: | |
# 0.2 | |
# |
#!/bin/bash | |
# | |
# The MIT License (MIT) | |
# | |
# Copyright (c) 2014 Mathias Leppich <[email protected]> | |
# | |
# 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 |
#!/bin/sh | |
# vault-merge | |
# Benjamin Ragheb <[email protected]> | |
# This shell script handles conflicts generated by attempts to merge encrypted | |
# Ansible Vault files. Run `git merge` as usual; when git warns of a merge | |
# conflict, run this command to attempt a merge on the unencrypted versions of | |
# the file. If there are conflicts, you will be given a chance to correct them | |
# in $EDITOR. |
#!/usr/bin/env ruby | |
# Usage | |
# $ docker-machine create my-machine123 -d virtualbox | |
# $ ruby <(curl -L https://git.io/vvvco) my-machine123 | |
# https://gist.github.com/mattes/4d7f435d759ca2581347 | |
require 'erb' | |
bootlocalsh = %Q(#/bin/bash |
This guide will show you how to use Intel graphics for rendering display and NVIDIA graphics for CUDA computing on Ubuntu 18.04 / 20.04 desktop.
I made this work on an ordinary gaming PC with two graphics devices, an Intel UHD Graphics 630 plus an NVIDIA GeForce GTX 1080 Ti.
Both of them can be shown via lspci | grep VGA
.
00:02.0 VGA compatible controller: Intel Corporation Device 3e92
01:00.0 VGA compatible controller: NVIDIA Corporation GP102 [GeForce GTX 1080 Ti] (rev a1)