Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@ukolka
ukolka / init.el
Last active August 29, 2015 14:02
Emacs24 config
(package-initialize)
;; Require a newline at the end of a file
(setq require-final-newline t)
;; Make mouse work in text mode
(require 'mouse)
(xterm-mouse-mode t)
(defun track-mouse (e))
(setq mouse-sel-mode t)
@ukolka
ukolka / HttpStreamWrapperTestCase.php
Last active August 15, 2019 12:19
PHPUnit extension for testing code that's using PHP's http:// stream wrapper context to make requests.
<?php
namespace tests\unittests\custom;
/**
* Whenever PHP HTTP stream is used you can
* inject a mock stream resource into an object that
* expect it.
*
* Usage example:
*
* ...
@ukolka
ukolka / get-attachment.sh
Last active December 18, 2015 23:39
Bash scripts for downloading Pivotal Tracker attachments. Having your Pivotal Tracker username and password you can run login.sh to log into the tracker. After that you can download as many attachments as you want until session lasts using their IDs with get-attachment.sh.
#!/bin/bash
#
# Author: Mykola Bespaliuk
# Fetches attachment by ID into a file
# Usage: ./get-attachment.sh 12345 /path/to/output/file
USAGE="Usage: ./get-attachment.sh 12345 /path/to/output/file"
if [[ $# -ne 2 ]]; then
echo "Wrong arguments number"