Skip to content

Instantly share code, notes, and snippets.

View rileyrg's full-sized avatar
💭
Emacs can replace PHPStorm

RichieHH rileyrg

💭
Emacs can replace PHPStorm
  • Hamburg, Germany
View GitHub Profile
[01:24]<stanleykubrik> https://gist.github.com/4376974
<stanleykubrik> man this gist integration is really handy.
[01:26]<stanleykubrik> myeffort: hrm well this sucks
<leth> stanleykubrik: my php-mode indents it.
(require 'gist
(define-key mode-specific-map [?I] (lambda()(interactive)(ido-buffer-internal ido-default-buffer-method nil nil nil "#")))
(define-key mode-specific-map [?p] 'gist-region)
'(ido-create-new-buffer (quote always))
'(ido-default-buffer-method (quote selected-window))
'(ido-enable-flex-matching t)
'(ido-enable-last-directory-history t)
'(ido-enable-regexp t)
'(ido-max-directory-size 300000)
'(ido-max-file-prompt-width 0.1)
'(ido-use-filename-at-point (quote guess))
'(ido-use-url-at-point nil)
'(ido-use-virtual-buffers t)
;; Fast buffer and refile targets with fuzzy completion.
(require 'ido)
(ido-everywhere t)
(ido-mode t)
(setq ido-file-extensions-order '(".org" ".txt" ".py" ".emacs" ".xml" ".el" ".ini" ".cfg" ".cnf"))
;; disable auto searching for files unless called explicitly
(setq ido-auto-merge-delay-time 0.3)
;; (define-key ido-file-dir-completion-map (kbd "M-s")
;; (lambda()
@rileyrg
rileyrg / build.gradle
Created April 8, 2014 11:50
Upload to mavenLocal() (added to repos in parent) the simple way.
apply plugin: 'maven'
group = 'net.richardriley'
archivesBaseName = 'testlib'
version = '0.1'
@rileyrg
rileyrg / build.gradle
Created May 1, 2014 10:42
loadVersion : how?
ext.versionFile = file('version.properties')
task wrapper(type:Wrapper){
gradleVersion="1.10"
}
task loadVersion {
project.version = readVersion()
println project.version
@rileyrg
rileyrg / gist:c8cf90db04a8d7b90dc1
Created July 30, 2014 11:16
using interfaces for callback
Create an interface to describe the "callbacks" available on my main activity so that a worker thread can callback and have the activity update certain mainthread views.
,----
| public interface HoneyBeezListener {
| public void frameRate(int frameCount);
| /* add other callbacks here */
| }
`----
In my customview create a holder for the callback interface and a setter
@rileyrg
rileyrg / gist:342a02d5b569bc8a6f5c
Created August 18, 2014 15:28
First view adaptor
public class DisplayDebug {
private LinkedHashMap<String, String> debugMap = new LinkedHashMap();
public void put(String var, String val) {
debugMap.put(var, val);
}
public DisplayDebug(Activity activity) {
ListView listview = (ListView) activity.findViewById(R.id.debugview);
DebugAdaptor adapter = new DebugAdaptor(activity, debugMap);
gist-region-or-buffer)