Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
clear
echo "Android install and build script for non-gradle Github repo.\n"
# RETRIEVING SETTINGS
lastGithubURLSettingsFile=~/Projects/tools/.github_tool_settings_url
if [ ! -f $lastGithubURLSettingsFile ]
then
touch $lastGithubURLSettingsFile
fi
source $lastGithubURLSettingsFile
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import com.example.android.R;
@st-f
st-f / Homebrew_Cask_Softwares_List.sh
Last active August 29, 2015 14:17
Converts the Mac OS X applications folder into an lowercase, comma-separated list of possible packages names for caskroom.io. Execute from any location, will export to ~/Documents/softwarelist.txt.
OUT=`ls /Applications/`; OUT2=${OUT//$'\n'/,}; OUT3=${OUT2//.app/}; OUT4=${OUT3// /-}; echo $OUT4 | tr '[:upper:]' '[:lower:]' > ~/Documents/softwarelist.txt
@st-f
st-f / Homebrew_Cask_Install.sh
Last active August 29, 2015 14:17
HomeBrew Cask automatic search / install
###############################################################################
# Homebrew and softwares #
###############################################################################
clear
rulem () {
if [ $# -eq 0 ]; then
echo "Usage: rulem MESSAGE [RULE_CHARACTER]"
return 1
fi
size=${#1}
@st-f
st-f / Android_Wear_Emulator_Connection_ADB.sh
Created April 30, 2015 13:26
Android Wear Emulator connection via ADB
adb -s TA00301CVR forward tcp:5601 tcp:5601
@st-f
st-f / Count lines in Git repo
Created December 30, 2015 12:46 — forked from mandiwise/Count lines in Git repo
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@st-f
st-f / AndroidColors
Created April 28, 2015 11:12
Handy generic color set for Android
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white">#FFFFFF</color>
<color name="ivory">#FFFFF0</color>
<color name="lightyellow">#FFFFE0</color>
<color name="yellow">#FFFF00</color>
<color name="snow">#FFFAFA</color>
<color name="floralwhite">#FFFAF0</color>
<color name="lemonchiffon">#FFFACD</color>
<color name="cornsilk">#FFF8DC</color>
08-15 01:23:29.947 3122-3122/net.stf.timelapser E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
08-15 01:23:30.151 3122-3172/net.stf.timelapser E/Rajawali: [org.rajawali3d.loader.LoaderOBJ.MaterialLib] Could not find material library file (.mtl).
08-15 01:23:31.932 3122-3160/net.stf.timelapser E/Rajawali: Getting location of uniform: uTime returned -1!
08-15 01:23:31.932 3122-3160/net.stf.timelapser E/Rajawali: Getting location of uniform: uLightPosition0 returned -1!
08-15 01:23:31.933 3122-3160/net.stf.timelapser E/Rajawali: Getting location of uniform: uLightPosition1 returned -1!
08-15 01:23:41.037 3122-3122/net.stf.timelapser E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
08-15 01:23:41.118 3122-3387/net.stf.timelapser E/Rajawali: [org.rajawali3d.loader.LoaderOBJ.MaterialLib] Could not find material library file (.mtl).
08-15 01:23:41.122 3122-3386/net.stf.timelapser E/Rajawali: [org.rajawali3d.loader.LoaderOBJ.MaterialLib] Could not find
systemctl status bluetooth
sudo systemctl start bluetooth
sudo apt-get install bluetooth bluez-utils blueman bluez python-gobject python-gobject-2
sudo usermod -G bluetooth -a pi
sudo apt-get install blueman
<script>
function isInView(el) {
return (el.getBoundingClientRect().top >= 0) && (el.getBoundingClientRect().bottom <= window.innerHeight);
}
function checkVisibility() {
var images = document.getElementsByTagName('img');
for (var i=0; i<images.length; i++) {
if(images[i].getAttribute('data-src') && images[i].getAttribute('src') == null) {
if (isInView(images[i]))