Skip to content

Instantly share code, notes, and snippets.

View mishak87's full-sized avatar

Michal Gebauer mishak87

View GitHub Profile
@mishak87
mishak87 / fix-gpumon.sh
Created January 29, 2014 18:33
Litecoin BAMT 1.3 fixes
#!/bin/sh
apt-get install dos2unix -y
dos2unix /opt/bamt/gpumon
dos2unix /opt/bamt/mgpumon
@mishak87
mishak87 / install-ADL-SDK.sh
Last active August 29, 2015 13:55
Litecoin BAMT 1.3 driver update
#!/bin/sh
VERSION=6.0
cd /tmp
unzip ADL_SDK_$VERSION.zip
cp /tmp/include/* /opt/miners/cgminer/ADL_SDK
<?php
trait TemplateFactory
{
/**
* @inject
* @var \Rixxi\ITemplateFactory
*/
public $templateFactory;
@mishak87
mishak87 / bin
Created January 7, 2014 21:36
CLI launchers for Nette - Place in app root or change path in bin.
#!/usr/bin/env php
<?php
// Let bootstrap create Dependency Injection container.
$container = require __DIR__ . '/app/bootstrap.php';
// Run application.
$container->getService('application')->run();
@mishak87
mishak87 / bootstrap.php
Created November 27, 2013 12:26
getsentry.com + nette
<?php
// ... autoload and stuff
/**
* Really stupid handler that takes first argument that is instance of an exception
*/
Nette\Diagnostics\Debugger::$onFatalError[] = $errorHandler = function () {
static $client = NULL;
@mishak87
mishak87 / dsn
Created November 11, 2013 10:33
MSSQL & PHP on *nix
dblib:host=<host>;dbname=<dbname>
apt-get update
apt-get install -q -y python-software-properties
add-apt-repository ppa:ondrej/php5
add-apt-repository ppa:chris-lea/node.js
apt-get install -q -y php5 php5-fpm php5-mssql php5-gd php5-imagick php5-mysql php5-curl php5-cli php5-pgsql
apt-get remove -q -y apache2
apt-get install -q -y nginx mysql-server git curl nodejs
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
ko.extenders.url = function (target, option) {
var value = $.address.parameter(option);
if (value) {
target(value);
}
target.subscribe(function (value) {
$.address.parameter(option, value);
});
@mishak87
mishak87 / librarian-puppet-win.md
Last active November 24, 2016 04:18
Howto install puppet and librarian-puppet on Win 7
@mishak87
mishak87 / editor.reg
Created September 16, 2013 21:10
Nette tool to ease up pain from errors (bind to editor: protocol via reg) PHPStorm and with fallback to Sublime Text
REGEDIT4
[HKEY_CLASSES_ROOT\editor]
@="URL:editor Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\editor\shell\open\command]
@="wscript \"C:\\bin\\scripts\\run-editor.js\" \"%1\""