Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Valeria Rogatchevskikh valllllll2000

🎯
Focusing
  • Barcelona, Spain
View GitHub Profile
@valllllll2000
valllllll2000 / git_commands.sh
Last active February 28, 2023 15:45
Useful git commands
View git_commands.sh
#Pretty and comprehensive git log
# see https://git-scm.com/docs/git-log#_commit_formatting for options
git log --graph --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%an%C(reset)%C(bold yellow)%d%C(reset) %C(dim white)- %s%C(reset)' --all
#display stats about a commit
# see https://git-scm.com/docs/git-show
git show b1e7dcb0204d1eab337d0ff7b41a3e53441ed2bc --stat
#show changes for a file
git show <commit> -- <filepath>
@valllllll2000
valllllll2000 / disable_animations.sh
Last active December 21, 2022 10:27
disable animations
View disable_animations.sh
adb shell settings put global window_animation_scale 0.0
adb shell settings put global transition_animation_scale 0.0
adb shell settings put global animator_duration_scale 0.0
# keyboard
adb shell settings put secure show_ime_with_hard_keyboard 0
@valllllll2000
valllllll2000 / script2.ps1
Last active January 30, 2021 11:00
Azure cloud shell script to create Joe's Garage PC for the project 1, Udacity Cybersecurity Nanodegree
View script2.ps1
# Script is identical to the one provided by the course Udacity Cybersecurity Nanodegree except I commented out some lines
# so it can be run in the cloud Shell
# Objective: use azure cloud shell to create Joe's Garage PC for the project
$transcriptFileName = ("{0}\{1}.txt" -f $env:TEMP, ([datetime]::Now.ToString("yy.MM.dd_hh.mm.ss")))
$resourceLocation = "East US2"
$udacityLabAgentAppName = "Udacity CYBERND01 Student VM Agent"
@valllllll2000
valllllll2000 / script.ps1
Last active January 28, 2021 00:58
script to run in the Azure Cloud shell - Udacity CyberSecurity NanoDegree
View script.ps1
# Script is identical to the one provided by the course Udacity Cybersecurity Nanodegree except I commented out some lines
# so it can be run in the cloud Shell
$transcriptFileName = ("{0}\{1}.txt" -f $env:TEMP, ([datetime]::Now.ToString("yy.MM.dd_hh.mm.ss")))
$resourceLocation = "East US2"
$udacityLabAgentAppName = "Udacity CYBERND01 Student VM Agent"
View deploy_app_bitrise.sh
#!/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 \
'{
View android_version_code_update.sh
#!/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
@valllllll2000
valllllll2000 / travis_flow_app_build.sh
Created February 14, 2019 14:30
trigger travis to deploy app to instance
View travis_flow_app_build.sh
#!/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
@valllllll2000
valllllll2000 / path.sh
Created February 6, 2019 11:17
path settings for Android dev
View path.sh
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
View Akvo Flow Copyright
@valllllll2000
valllllll2000 / pre-commit
Last active February 2, 2019 13:12
Check if copyright statements include the current year, place in .git/hooks folder
View pre-commit
#!/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