Skip to content

Instantly share code, notes, and snippets.

@cbarraco
cbarraco / install android environment
Last active December 29, 2015 10:08
Uninstalls OpenJDK and Installs the Oracle JRE & JDK and the Android SDK & NDK in Ubuntu. Basically a script version of http://www.wikihow.com/Install-Oracle-Java-on-Ubuntu-Linux with the Android SDK and NDK thrown in.
echo "*******************************************"
echo "********** Uninstalling Open-JDK **********"
echo "*******************************************"
sudo apt-get purge openjdk-\*
echo "***************************************"
echo "********** Downloading Files **********"
echo "***************************************"
wget "http://dl.google.com/android/android-sdk_r22.6.2-linux.tgz"
wget "http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2"
@cbarraco
cbarraco / Open package without activity using ADB
Created January 22, 2014 02:01
If you only know the package name of the app you want to launch but not the name of it's main activity, use this command. Just replace com.android.chrome with the package name of the app you want to open. The monkey command is used for making random touch and keyboard inputs on the connected device. This command only specifies that one event can…
adb shell monkey -p com.android.chrome -c android.intent.category.LAUNCHER 1
cp /usr/share/vim/vim74/vimrc_example.vim ~/.vimrc
style "darkback"
{
bg[NORMAL] = "#404040"
bg[ACTIVE] = "#606060"
bg[PRELIGHT] = "#808080"
fg[NORMAL] = "#ccc"
fg[ACTIVE] = "#fff"
fg[PRELIGHT] = "#fff"
}
widget "whiskermenu-window*" style "darkback"
sudo grep -lr -e 'd64937' * | sudo xargs sed -i 's/d64937/019875/g'
@cbarraco
cbarraco / How to compile and install i3 with gaps
Last active May 20, 2016 16:13
Compile and install i3 with gaps
To Compile and Install i3-gaps:
git clone https://github.com/Airblader/i3.git && cd i3
sudo apt-get build-dep i3
sudo make && sudo make install
To Fix Titlebars:
for_window [class="^.*"] border pixel 0
@cbarraco
cbarraco / .conkybar
Created March 1, 2015 23:18
My conky bar
double_buffer yes
own_window yes
own_window_transparent no
own_window_type override
own_window_hints sticky
draw_borders no
alignment top_left
update_interval 1
default_color 857d59
own_window_colour 1a1a1a
pcm.!default {
type hw
card 0
}
ctl.!default {
type hw
card 0
}
@rem *** Disable Some Service ***
sc stop DiagTrack
sc stop diagnosticshub.standardcollector.service
sc stop dmwappushservice
sc stop WMPNetworkSvc
sc stop WSearch
sc config DiagTrack start= disabled
sc config diagnosticshub.standardcollector.service start= disabled
sc config dmwappushservice start= disabled
@cbarraco
cbarraco / taking screenshot in linux with C
Created October 7, 2015 15:11 — forked from bozdag/taking screenshot in linux with C
This C program takes the whole screenshot of the root window for a given display and saves it in PNG file format.
/*
Grabs a screenshot of the root window.
Usage : ./scr_tool <display> <output file>
Example : ./scr_tool :0 /path/to/output.png
Author: S Bozdag <selcuk.bozdag@gmail.com>
*/