Skip to content

Instantly share code, notes, and snippets.

- JTZ885YXJTKQ64Q0HRYXJKX
- HT0ZWTB32QTFZF4Z3JJMVZH
- VF0BQ4FAPGS3ZUKJU55CTMY
- YA1J8BU0N0941Y0Z7TXZFEY
- KM05SALCCLGCGD11VL785C9
- PR0WJDRQLU5WTKY981B9YJE
- 7NX9004E0KSH5AAUCQ9G3N3
- TKC3NBS93L6K9P0YN94WZZX
- CRNUKTHJ05RWGY3GL967V4G
- NF6HR4GJAS7AWBBY7B3U6J6
https://github.com/laurencedawson/reddit-sync-development/issues/34
https://github.com/laurencedawson/reddit-sync-development/issues/161
https://github.com/laurencedawson/reddit-sync-development/issues/152
https://github.com/laurencedawson/reddit-sync-development/issues/148
https://github.com/laurencedawson/reddit-sync-development/issues/147
https://github.com/laurencedawson/reddit-sync-development/issues/138
https://github.com/laurencedawson/reddit-sync-development/issues/129
https://github.com/laurencedawson/reddit-sync-development/issues/128
https://github.com/laurencedawson/reddit-sync-development/issues/116
https://github.com/laurencedawson/reddit-sync-development/issues/107
// Create the resampling runnable
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB && mSample == null && sampleName!=null ){
mSample = new Runnable() {
@Override
public void run() {
try{
// Only decode if the pointer is not touching
if(mTouchStatus!=MotionEvent.ACTION_DOWN){
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(sampleName, options);
@laurencedawson
laurencedawson / gist:1848207
Created February 16, 2012 22:05
PagerTitleStrip
<android.support.v4.view.ViewPager
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<android.support.v4.view.PagerTitleStrip
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:textColor="#000"
android:textSize="5dp" />
# Navigate to the xorg extensions dir
cd /usr/lib/xorg/modules/extensions
# Move the existing lib
sudo mv libglx.so libglx.so.xorg
# Point the NVIDIA lib to libglx.so and reboot
sudo ln -s libglx.so.285.05.33 libglx.so
sudo reboot
@laurencedawson
laurencedawson / gist:1765651
Created February 8, 2012 05:14
Android animation
// An exmaple of chaning the layer type and applying
// an alpha animation to the view
view.setLayerType(View.LAYER_TYPE_HARDWARE, null);
ObjectAnimator animator = ObjectAnimator.ofFloat(
view, View.ALPHA, 0, 1);
animator.addListener(new AnimatorListenerAdapter(){
@Override
public void onAnimationEnd(Animator animation){
@laurencedawson
laurencedawson / gist:1765507
Created February 8, 2012 04:46
Make the SDK CUDA
# Navigate to the SDK dir
cd NVIDIA_GPU_Computing_SDK
# Compile the examples
sudo make
@laurencedawson
laurencedawson / gist:1765505
Created February 8, 2012 04:45
Fix broken links cuda
# Install freeglut and libxi
sudo apt-get install freeglut3-dev libxi-dev
# Fix a missing link
sudo ln -s /usr/lib/libXmu.so.6 /usr/lib/libXmu.so
# Remove the dead link
sudo rm /usr/lib/libGL.so
# Add a new link in order to compile the OpenGL demos
sudo ln -s /usr/lib/libGL.so.285.05.33 /usr/lib/libGL.so
@laurencedawson
laurencedawson / gist:1765497
Created February 8, 2012 04:41
Setup build
# Install the essentials to build the SDK examples
sudo apt-get install gcc-4.4 g++-4.4 build-essential
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.4
@laurencedawson
laurencedawson / gist:1765480
Created February 8, 2012 04:38
CUDA get and install SDK
# Grab the SDK direct from NVIDIA
wget http://developer.download.nvidia.com/compute/cuda/4_1/rel/sdk/gpucomputingsdk_4.1.28_linux.run
# Install the toolkit
sudo sh gpucomputingsdk_4.1.28_linux.run