Skip to content

Instantly share code, notes, and snippets.

@TriplEight
TriplEight / strings.xml
Created April 24, 2016 20:28 — forked from udacityandroid/strings.xml
Android for Beginners : Spanish Localization Solution. This would be saved in the res/values-es/strings.xml file.
<?xml version="1.0" encoding="utf-8"?>
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<!-- Title for the application. [CHAR LIMIT=12] -->
<string name="app_name">Sólo Java</string>
<!-- Hint text display in the empty field for the user's name [CHAR LIMIT=20] -->
<string name="name">Nombre</string>
<!-- Hint text display in the empty field for the user's name [CHAR LIMIT=20] -->
<string name="toppings">Ingredientes</string>
# -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
SEARCH_XPATH = '//*[@name="q"]'
# WIKI_XPATH = '//h3//*[@href="https://ru.wikipedia.org/wiki/QA"]'
WIKI_XPATH = '//h3//*[@href="https://en.wikipedia.org/wiki/Quality_assurance"]'
WIKI_LOGO_XPATH = '//*[@class="mw-wiki-logo"]'
from selenium.webdriver.support import expected_conditions as EC
class AbstractPage(BasePage):
def find_element_in_table(self, search_by, table_x, column_header_x, is_clickable=False):
"""
Возвращает элемент таблицы :param table_x, найденный по пересечению ряда и столбца.
:param is_clickable:
:param search_by: уникальное значение (id, name) в таблице, нужно для определения ряда
:param table_x: XPATH таблицы
@TriplEight
TriplEight / gist:f25f8e04cb456505930f5589a513e720
Last active December 19, 2018 09:24
compilation failure
error: failed to run custom build command for `libusb-sys v0.2.4 (https://github.com/paritytech/libusb-sys#14bdb698)`
process didn't exit successfully: `/build/parity-ethereum/target/release/build/libusb-sys-0791beef101dd27b/build-script-build` (exit code: 101)
--- stdout
TARGET = Some("x86_64-pc-windows-gnu")
OPT_LEVEL = Some("3")
HOST = Some("x86_64-unknown-linux-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = Some("x86_64-w64-mingw32-gcc-posix")
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
@TriplEight
TriplEight / dietpi.md
Created February 1, 2019 08:58
dietpi logs

root@DietPi:~# systemctl status dietpi-postboot ● dietpi-postboot.service - DietPi-PostBoot Loaded: loaded (/etc/systemd/system/dietpi-postboot.service; enabled; vendor preset: enabled) Active: active (exited) since Fri 2019-02-01 08:54:41 GMT; 44s ago Process: 863 ExecStart=/DietPi/dietpi/postboot (code=exited, status=0/SUCCESS) Main PID: 863 (code=exited, status=0/SUCCESS)

Feb 01 08:54:41 DietPi systemd[1]: Started DietPi-PostBoot.

root@DietPi:~# systemctl status dietpi-boot

Accounts

Different accounts are used to manage funds. The underlying cryptography of their account keys is the same:

Stash

  • Primary account
  • Holds funds. Usually a cold wallet (on piece of paper in a safe, or protected by layers of hardware security)
  • Bonds (locks) a portion of its funds with a Controller for participation (since the stake key is kept offline)
  • Unbonding requires waiting ~600 blocks before unlocked funds accessible again

Keybase proof

I hereby claim:

  • I am TriplEight on github.
  • I am tripleight (https://keybase.io/tripleight) on keybase.
  • I have a public key whose fingerprint is EAE4 67DA 6A8E 8E43 BA2C DF06 3906 9184 3612 02D8

To claim this, I am signing this object:

@TriplEight
TriplEight / .bashrc
Last active April 13, 2021 12:23
Function for bash/fish to run cargo as a virtual environment in the current dir
# "Cargo as a virtual environment in the current dir"
function cargoenvhere {
dirname="$(basename $(pwd))"
user=$(whoami)
echo "Cargo as a virtual environment in" "$dirname" "dir"
mkdir -p /home/"$user"/cache/"$dirname"
podman run --rm -it -w /shellhere/"$dirname" -v "$(pwd)":/shellhere/"$dirname" -v /home/"$user"/cache/"$dirname"/:/cache/ -e CARGO_HOME=/cache/cargo/ -e SCCACHE_DIR=/cache/sccache/ -e CARGO_TARGET_DIR=/cache/target/ "$@"
}
# example use
@TriplEight
TriplEight / github_repos_by_latest_commit.py
Last active April 12, 2022 18:57
List organization's repos, last master commit date and author
# Script to fetch all repos under a git organization
# Returns last committer to master, date of commit
# and if the repo is archived.
#
# Results sorted by commit date
# Replace ORG_NAME, USERNAME, and PASSWORD variables
# import urllib2
from urllib.request import urlopen
import requests
0.0.0.0 us.rdx2.lgtvsdp.com
0.0.0.0 us.info.lgsmartad.com
0.0.0.0 us.ibs.lgappstv.com
0.0.0.0 CA.ibs.lgappstv.com
0.0.0.0 us.lgtvsdp.com
0.0.0.0 ad.lgappstv.com
0.0.0.0 smartshare.lgtvsdp.com
0.0.0.0 ibis.lgappstv.com
# added after fork