Skip to content

Instantly share code, notes, and snippets.

View sgnn7's full-sized avatar
🤔
ǝʌᴉʇɔǝdsɹǝd ɹnoʎ ǝƃuɐɥƆ

Srdjan Grubor sgnn7

🤔
ǝʌᴉʇɔǝdsɹǝd ɹnoʎ ǝƃuɐɥƆ
View GitHub Profile
@sgnn7
sgnn7 / listactivities.sh
Created October 27, 2011 16:02
Listing activity stack of an android app
#!/bin/bash
adb shell dumpsys activity | grep Intent | grep -v 'Intent:' | grep -v Sticky | sed -e 's/.* cmp=.*\///g' | sed -e 's/}//g'
@sgnn7
sgnn7 / show_mem_usage
Created December 15, 2011 21:09
Showing the memory usage of android app
#!/bin/bash
adb shell dumpsys meminfo | awk '/^\*\*.*com.asolutions.endless.mobility/ { c=20;{print}next}c-->0'
@sgnn7
sgnn7 / ClassLauncher.java
Created December 16, 2011 17:57
Android - opening activity from class name
package org.sgnn7.util;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
public class ClassLauncher {
private final Context context;
public ClassLauncher(Context context) {
@sgnn7
sgnn7 / AnimatedTextView.java
Created January 3, 2012 20:31
Android - Fading in/out textview
package org.sgnn7.ui;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.TextView;
import org.sgnn7.R;
Index: linux-exynos4-3.0.84/debian/config/armhf/config.odroidu2
===================================================================
--- linux-exynos4-3.0.84.orig/debian/config/armhf/config.odroidu2 2013-11-04 11:33:52.771423136 -0600
+++ linux-exynos4-3.0.84/debian/config/armhf/config.odroidu2 2013-11-04 11:38:02.691411994 -0600
@@ -345,7 +345,6 @@
CONFIG_S5P_SYSTEM_MMU=y
# CONFIG_S5P_SYSTEM_MMU_REFCOUNT is not set
# CONFIG_S5P_SYSTEM_MMU_DEBUG is not set
-CONFIG_S3C_DEV_FIMC=y
CONFIG_S5P_DEV_I2C_HDMIPHY=y
Index: gnome-control-center-3.8.2/panels/background/cc-background-xml.c
===================================================================
--- gnome-control-center-3.8.2.orig/panels/background/cc-background-xml.c 2013-11-27 15:52:21.000000000 -0500
+++ gnome-control-center-3.8.2/panels/background/cc-background-xml.c 2013-11-27 16:27:56.893478447 -0500
@@ -329,10 +329,24 @@
}
/* Resolve symlink if present */
- if (g_file_info_get_is_symlink (file_info))
- id = g_filename_to_uri (g_file_info_get_symlink_target (file_info),
Index: gnome-initial-setup-0.12/gnome-initial-setup/pages/location/gis-location-page.c
===================================================================
--- gnome-initial-setup-0.12.orig/gnome-initial-setup/pages/location/gis-location-page.c 2013-12-16 19:42:29.000000000 -0600
+++ gnome-initial-setup-0.12/gnome-initial-setup/pages/location/gis-location-page.c 2013-12-16 19:45:29.354775391 -0600
@@ -294,7 +294,7 @@
}
static void
-queue_set_datetime (GisLocationPage *page)
+queue_set_time (GisLocationPage *page)
@sgnn7
sgnn7 / upload_to_aws.sh
Last active August 29, 2015 14:01
Upload file to S3
#!/bin/bash -e
if [ $# -ne 2 ]; then
echo "Usage: $0 <file> <s3keysecret>"
exit 1
fi
if [ ! -f $1 ]; then
echo "File $1 not found. Exiting"
exit 1
#!/usr/bin/env python
import gevent.monkey
gevent.monkey.patch_all()
import boto
import config
import gevent
import gevent.pool
import os
@sgnn7
sgnn7 / download_railscasts.sh
Created September 2, 2014 18:07
RailsCasts download
#!/usr/bin/env ruby
# A script to download the latest episodes from railscasts.com
#
# modifications: sgnn7 <sgnn7@sgnn7.org>
# original author: modsaid <mahmoud@modsaid.com>
require 'rubygems'
require 'json'
require 'open-uri'