This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; geeknote ============================================================== | |
(defun geeknote-mode () | |
(interactive) | |
(eshell-command "python ~/geeknote/geeknote.py settings --editor /Applications/Emacs.app/Contents/MacOS/bin/emacsclient") | |
) | |
(defun geeknote-create (newnote) | |
(interactive "sname: ") | |
(eshell-command | |
(format "python ~/geeknote/geeknote.py create --content WRITE --title %s" newnote)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; Region lines and then `M-x osx-say' to make OSX speak. | |
;; Adjust speak speed | |
(setq osx-say-speed 180) | |
;; Change voice | |
;; Kathy, Vicki, Victoria, Alex, Bruce, Fred | |
(setq osx-say-voice "Alex") | |
(setq osx-say-buffer "*osx say*") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(when (and (eq system-type 'darwin) (eq window-system nil)) | |
(defun open-os-x-terminal () | |
(shell-command "open -a /Applications/Utilities/Terminal.app")) | |
(add-hook 'edit-server-start-hook 'open-os-x-terminal)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun phing-call (target) | |
"Call Phing's build.xml" | |
;; Ask for target to execute | |
(interactive "MPhing Target: ") | |
;; Open a new *phing-compilation* buffer & kill the old one | |
(let ((oldbuf (get-buffer "*phing-compilation*"))) | |
(if (not (null oldbuf)) | |
(kill-buffer "*phing-compilation*"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure the following is installed: | |
# - Xcode Command Line Tools (xcode-select --install) | |
# - OpenSSL from homebrew (brew install openssl && brew link openssl --force) | |
# dependencies and preparations | |
brew update | |
brew install git ossp-uuid md5sha1sum coreutils pcre gnutls libidn gsasl pkg-config libxml2 | |
brew link libxml2 --force | |
brew tap darinmorrison/haskell | |
brew install darinmorrison/haskell/cabal-install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; -*- lexical-binding: t -*- | |
(require 'cl-lib) | |
(defun es-scrape-web-listing | |
(start-url collect-function next-url-function done-function | |
&optional pages-limit silent) | |
"Retrieve a list of things from a multi-page web document. | |
START-URL is the location from which to start scraping. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @Given /^I am viewing a product with the following related products:$/ | |
*/ | |
public function assertRelatedProducts(TableNode $relatedProducts) { | |
// First, create a product. | |
$product = (object) array( | |
'title' => 'Parent Product', | |
'type' => 'product', | |
'uid' => 1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'cl) | |
(defun git-repository-root () | |
(with-temp-buffer | |
(let* ((cmd "git rev-parse --show-toplevel") | |
(ret (call-process-shell-command cmd nil t))) | |
(unless (zerop ret) | |
(error "Here is not Git repository")) | |
(goto-char (point-min)) | |
(buffer-substring-no-properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC | |
"-//Apple//DTD PLIST 1.0//EN" | |
"http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>homebrew.mxcl.bitlbee</string> | |
<key>ProgramArguments</key> | |
<array> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 |
NewerOlder