Skip to content

Instantly share code, notes, and snippets.

View mishak87's full-sized avatar

Michal Gebauer mishak87

View GitHub Profile
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
@mishak87
mishak87 / dsn
Created November 11, 2013 10:33
MSSQL & PHP on *nix
dblib:host=<host>;dbname=<dbname>
@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 / 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();
<?php
trait TemplateFactory
{
/**
* @inject
* @var \Rixxi\ITemplateFactory
*/
public $templateFactory;
@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
@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 / FundsCommand.php
Created February 6, 2014 13:06
Preview of async php api for mcxnow.com
<?php
namespace App;
use CryptoBot;
use CryptoBot\McxNow\Currency;
use Nette;
use React;
use React\Promise\When;
use Symfony;
@mishak87
mishak87 / example.html
Created February 10, 2014 20:32
WIP Semantic UI Dropdown module integration with Knockout - Not sure if replacing/updating options would work
<div class="ui dropdown selection" data-bind="dropdown: dropdown"></div>
<!-- actual template is in binding script -->
@mishak87
mishak87 / 0_reuse_code.js
Created February 28, 2014 14:17
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console