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
apply plugin: 'maven' | |
group = 'net.richardriley' | |
archivesBaseName = 'testlib' | |
version = '0.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
ext.versionFile = file('version.properties') | |
task wrapper(type:Wrapper){ | |
gradleVersion="1.10" | |
} | |
task loadVersion { | |
project.version = readVersion() | |
println project.version |
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
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 |
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
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); |
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
gist-region-or-buffer) |
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
(global-set-key (kbd "C-c f") | |
(lambda () | |
(interactive) | |
(require 'finder) | |
(let ((thing (intern (thing-at-point 'symbol)))) | |
(if (functionp thing) | |
(find-function thing) | |
(find-variable thing))))) |
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
(which-function-mode t) | |
(add-hook 'after-init-hook 'global-flycheck-mode) | |
;; (setq flycheck-check-syntax-automatically '(mode-enabled idle-change)) | |
;; (require 'flycheck-color-mode-line) | |
;; (eval-after-load "flycheck" | |
;; '(add-hook 'flycheck-mode-hook 'flycheck-color-mode-line-mode)) | |
(global-set-key (kbd "<f11>") 'next-error) |
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
#!/bin/bash | |
mountpoint="${1-/media/debianbackup}" | |
sudo mount "${mountpoint}" | |
mount | grep "${mountpoint}" >/dev/null | |
if [ "$?" -eq 0 ] | |
then | |
sudo rsync -aAXv /* "${1-"${mountpoint}"}" --exclude={"${HOME}"/.cache,/dev/*,/proc/*,/sys/*,/tmp/*,/run/*,/mnt/*,"${mountpoint}",/media/cdrom0,/lost+found} --delete | |
echo "Unmounting "${mountpoint}"" | |
sudo umount "${mountpoint}" | |
else |
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
debug1: expecting SSH2_MSG_NEWKEYS | |
debug2: set_newkeys: mode 0 | |
debug1: SSH2_MSG_NEWKEYS received | |
debug1: Roaming not allowed by server | |
debug1: SSH2_MSG_SERVICE_REQUEST sent | |
debug2: service_accept: ssh-userauth | |
debug1: SSH2_MSG_SERVICE_ACCEPT received | |
debug2: key: /home/rgr/.ssh/id_rsa (0x7fc8444e20d0), | |
debug2: key: /home/rgr/.ssh/id_dsa ((nil)), | |
debug2: key: /home/rgr/.ssh/id_ecdsa ((nil)), |
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
the fragment layout XML R.layout.debug_fragment | |
<ListView xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/debug_listview" | |
android:layout_width="128sp" | |
android:background="@color/shadedblack" | |
android:layout_height="wrap_content"> | |
</ListView> | |
fragment in a framelayout |
OlderNewer