Skip to content

Instantly share code, notes, and snippets.

@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 / 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")
}
}
@whalemare
whalemare / keybindings.json
Created August 5, 2019 12:45
VSCode keybindnings
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "cmd+q",
"command": "editor.action.showHover",
"when": "editorTextFocus"
},
{
"key": "cmd+w",
"command": "editor.action.smartSelect.expand",
@whalemare
whalemare / eslint-install.sh
Last active August 29, 2019 06:20
Fast install ESLint and Prettier
#!/bin/bash
file="package.json"
if [ -f "$file" ]
then
# all is ok
echo ""
else
cd ..
if [ -f "$file" ]
@whalemare
whalemare / index.js
Created July 15, 2019 10:12
Simple .sortBy implementation for JS
function compare(x, y) {
return x > y
}
/**
* @param {any[]} array list of items
* @param {() => boolean} f function selector
*/
function sortBy(array, f) {
return array.sort((x, y) => compare(f(x), f(y)))
class ProfileFragment : Fragment() {
val viewModel: ProfileViewModel by viewModel()
}