Skip to content

Instantly share code, notes, and snippets.

View valllllll2000's full-sized avatar
🎯
Focusing

Valeria R valllllll2000

🎯
Focusing
View GitHub Profile
@valllllll2000
valllllll2000 / scaletranslate.xml
Created October 27, 2012 10:12
Animations in xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="2.0"
android:toYScale="2.0"
android:duration="1000">
</scale>
<translate
@valllllll2000
valllllll2000 / post_install.sh
Last active November 25, 2016 10:46
Post Ubuntu Installation
#!/bin/sh
#ubunut 13.04 or 12.04
#This is my personal script tht I use after installation
#Please before running, read through to make sure this is what you want
sudo apt-get install synaptic
#remove shopping lenses
sudo apt-get autoremove unity-lens-shopping
sudo apt-get autoremove unity-lens-music
@valllllll2000
valllllll2000 / MyActivity.java
Created October 27, 2012 11:47
MyActivity for Animations
public class MyActivity extends Activity {
private Animation a;
private ImageView im;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@valllllll2000
valllllll2000 / dht22.py
Last active October 27, 2018 12:46
Send raspberry pi data to thinkspeak
"""
dht22.py
Temperature/Humidity monitor using Raspberry Pi and DHT22.
Data is displayed at thingspeak.com
Original author: Mahesh Venkitachalam at electronut.in
Modified by Adam Garbo on December 1, 2016
"""
import sys
import RPi.GPIO as GPIO
from time import sleep
@valllllll2000
valllllll2000 / pre-commit
Last active February 2, 2019 13:12
Check if copyright statements include the current year, place in .git/hooks folder
#!/bin/bash
# Check if copyright statements include the current year
files=`git diff --cached --name-only`
year=`date +"%Y"`
for f in $files; do
head -10 $f | grep -i copyright 2>&1 1>/dev/null || continue
@valllllll2000
valllllll2000 / path.sh
Created February 6, 2019 11:17
path settings for Android dev
export JAVA_HOME=/usr/lib/jvm/java-8-oracle
export PATH=/home/valeria/Android/Sdk/tools:${PATH}
export PATH=/home/valeria/Android/Sdk/platform-tools:${PATH}
export ANDROID_HOME=/home/valeria/Android/Sdk
@valllllll2000
valllllll2000 / travis_flow_app_build.sh
Created February 14, 2019 14:30
trigger travis to deploy app to instance
#!/bin/bash
set -e
set -o nounset
# usage: sh travis_flow_app_build.sh instace branch token
# example sh travis_flow_app_build.sh akvoflow-uat1 release/2.7.1 xxx
# get your token from Travis website, in your user settings
# for a deploy in production use the master branch
#!/usr/bin/env bash
# fail if any commands fails
set -e
# debug log
set -x
VERSION="$(cat app/version.properties | grep -o "VERSION_CODE=\+[0-9]\+" | cut -c 14-)"
VERSION_NEW=$((VERSION+1))
echo $VERSION_NEW
sed -i "s/\(VERSION_CODE=\).*\$/\1${VERSION_NEW}/" app/version.properties
#!/bin/bash
set -e
[[ -n "${APP_SLUG}" ]] || { echo "APP_SLUG env var needs to be set"; exit 1; }
[[ -n "${ACCESS_TOKEN}" ]] || { echo "ACCESS_TOKEN env var needs to be set"; exit 1; }
INSTANCE="akvoflow-uat1"
curl -X POST -H "Authorization: ${ACCESS_TOKEN}" "https://api.bitrise.io/v0.1/apps/${APP_SLUG}/builds" -d \
'{