Skip to content

Instantly share code, notes, and snippets.

# Generated by Powerlevel10k configuration wizard on 2022-01-30 at 09:33 IST.
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 53041.
# Wizard options: nerdfont-complete + powerline, small icons, rainbow, unicode,
# 24h time, round separators, sharp heads, flat tails, 2 lines, solid, left frame,
# dark-ornaments, compact, many icons, concise, transient_prompt,
# instant_prompt=verbose.
# Type `p10k configure` to generate another config.
#
# Config for Powerlevel10k with powerline prompt style with colorful background.
# Type `p10k configure` to generate your own config based on it.
@vitalybe
vitalybe / agnoster-vitaly.zsh-theme
Last active November 11, 2021 10:29
Agnoster Prompt - Vitaly
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts).
# Make sure you have a recent version: the code points that Powerline
function App({ date }) {
const [currentDate, setCurrentDate] = useState(new Date());
const [count, setCount] = useState(0);
const prettyDate = useMemo(() => formatDate(currentDate), [currentDate]);
return (
<div className="App">
<h1>Hello CodeSandbox</h1>
<h2>
function formatDate(date) {
const hour = date.getHours();
const minute = date.getMinutes();
const second = date.getSeconds();
return (`${hour}:${minute}:${second}`);
}
const prettyDate = useMemo(() => formatDate(currentDate), [currentDate]);
function App({ date }) {
const [currentDate, setCurrentDate] = useState(new Date());
const [count, setCount] = useState(0);
function updateCount(byValue) {
setCount(count + byValue);
setCurrentDate(new Date());
}
function formatDate() {
@vitalybe
vitalybe / data.json
Last active February 12, 2019 14:19
[
{ "name": "Bandwidth 1", "provider": 48, "user": 240 },
{ "name": "Bandwidth 2", "provider": 10, "user": 80 },
{ "name": "Bandwidth 3", "provider": 50, "user": 75 }
]
@vitalybe
vitalybe / rtm-fluid-app.js
Created March 10, 2018 15:37
"Remember the Milk" Fluid app script for bouncing icons and badge
function findClassNames() {
var results = [].slice.call(document.querySelectorAll("div")).filter(function(o) {return o.innerText == "_Helper_"});
if(results.length == 1) {
nameNode = results[0];
nameClass = nameNode.classList[0]
countNode = [].slice.call(nameNode.parentNode.querySelectorAll("div")).filter(function(o) {return o.innerText == "1"})[0]
countClass = countNode.classList[0]
return {
nameClass: "." + nameClass,
@vitalybe
vitalybe / .tigrc
Created June 27, 2017 05:44
My .tigrc
#########
# GENERIC
#########
# git - generic
bind generic g ?sh -c "git %(prompt git )"
######
# MAIN
######
@vitalybe
vitalybe / gist:e52609e4cad280fc3ee2f9e68ce503f8
Created June 25, 2017 07:18
Karabiner Elements - CapsLock to hyper/escape
{
"global": {
"check_for_updates_on_startup": false,
"show_in_menu_bar": false,
"show_profile_name_in_menu_bar": false
},
"profiles": [
{
"complex_modifications": {
"rules": [
@vitalybe
vitalybe / sample.kt
Created March 20, 2017 13:16
Kotlin async sample in Android, including wrapping a legacy callback function
package jp.keita.kagurazaka.sample.coroutine
import android.os.Bundle
import android.support.v7.app.AppCompatActivity
import android.util.Log
import android.widget.Button
import android.widget.Toast
import kotlinx.coroutines.experimental.CommonPool
import kotlinx.coroutines.experimental.android.UI
import kotlinx.coroutines.experimental.async