Skip to content

Instantly share code, notes, and snippets.

@whalemare
whalemare / layout.xml
Last active October 18, 2022 04:53
EditText like TextView
<EditText
android:id="@+id/text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@null"
android:cursorVisible="false"
android:longClickable="false"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"/>
@whalemare
whalemare / launch_sublime_from_terminal.markdown
Last active April 25, 2021 16:57 — forked from artero/launch_sublime_from_terminal.markdown
Запускаем Sublime Text из терминала Mac OS X

Быстро

  1. C помощью Finder ищем путь до нашего приложения /Applications/Sublime\ Text.app
  2. Открываем open ~/.bash_profile
  3. Добавляем к нашему полученному пути следующую строчку /Contents/SharedSupport/bin/subl
  4. Записываем alias alias sublime="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
@whalemare
whalemare / farm-siege.scpt
Created January 19, 2021 07:50
Farm points in Siege PS4
set O to 53
set X to 36
set keyUp to 126
set keyDown to 125
set keyLeft to 123
set keyRight to 124
set countRepeat to 0
set minOk to 15
@whalemare
whalemare / MarginItemDecoration.java
Created January 2, 2018 08:01
Margin Item Decoration for RecyclerView
package com.mgrsys.uberforwine.screen.base.recycler;
import android.content.res.Resources;
import android.graphics.Rect;
import android.support.annotation.DimenRes;
import android.support.v7.widget.RecyclerView;
import android.view.View;
/**
* Developed by Magora Team (magora-systems.com)
@whalemare
whalemare / report.sh
Last active October 13, 2020 09:43
Bash script for generate daily-report
#!/bin/bash
# Daily report bash script
# This generate daily-report file for project, where it .sh will be executed
# For use move it to your project folder and exec in terminal:
# +x ; ./report.sh
DEBUG=0
directoryName="reports"
getName() {
@whalemare
whalemare / timezones.json
Created May 20, 2020 04:26
List of timezones
[
{
"zoneName": "Atlantic/Cape_Verde",
"offset": "-01:00"
},
{
"zoneName": "Brazil/DeNoronha",
"offset": "-02:00"
},
{
# instal docker
sudo apt update
sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt update
sudo apt install docker-ce
sudo systemctl status docker
@whalemare
whalemare / emulators.sh
Created December 26, 2019 06:40
Run Android emulator from command line
#! /bin/bash
# This script helped to you start emulator from cli
# Check if the emulator command exists first
if ! type emulator > /dev/null; then
export PATH=${PATH}:~/Library/Android/sdk/emulator
fi
if ! type emulator > /dev/null; then
firebase functions:config:set service_account="$(cat service-account.json)"
https://github.com/firebase/firebase-tools/issues/406#issuecomment-353017349
@whalemare
whalemare / Main.kt
Created October 17, 2019 08:16
Logger
/**
* @since 2019
* @author Anton Vlasov - whalemare
*/
class Main {
fun main(args: Array<String>) {
logger("hello")
}
}