git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
require 'uia/library/win32' | |
module Uia | |
class BadLocator < StandardError | |
def initialize(locator) | |
super "#{locator} is not a valid locator" | |
end | |
end | |
class BadChildLocator < BadLocator; end |
# Optional stylus section | |
# 'command' defaults to 'stylus' if not present | |
# 'options' default to blank if not present | |
# 'options' are a YAML String | |
stylus: | |
command: ./node_modules/stylus/bin/stylus | |
options: | |
--include ./css | |
--include ./node_modules/nib/lib |
# Small wrapper around pipenv to provide activate/deactivate commands | |
function pe() { | |
if [[ $# = 1 && ${#1} > 1 ]]; then | |
if [[ 'activate' =~ "^$1" ]]; then | |
local venv="$(pipenv --venv 2> /dev/null)" | |
if [ -n "$venv" ]; then | |
echo "Activating '$venv'" | |
source $venv/bin/activate | |
else | |
echo "No virtual environment for this directory" |
#!/bin/sh | |
lastlog_file="/home/admin/link-down/lastlog.txt" | |
history_file="/home/admin/link-down/history.txt" | |
down_logs="clog /var/log/system.log | grep 'link state changed to DOWN$'" | |
last_log=`eval $down_logs | tail -1` | |
if [ ! -e $lastlog_file ]; then | |
echo "$last_log" >$lastlog_file | |
touch -A -235959 $lastlog_file |
-------------------- HELPERS ------------------------------- | |
local api, cmd, fn, g = vim.api, vim.cmd, vim.fn, vim.g | |
local execute = vim.api.nvim_command | |
local scopes = {o = vim.o, b = vim.bo, w = vim.wo} | |
local function map(mode, lhs, rhs, opts) | |
local options = {noremap = true} | |
if opts then options = vim.tbl_extend('force', options, opts) end | |
api.nvim_set_keymap(mode, lhs, rhs, options) | |
end |
#!python3 | |
# Based on: https://community.home-assistant.io/t/api-for-changing-entities/282114/3 | |
import asyncio | |
import json | |
import os | |
import re | |
import sys | |
import yaml # type: ignore | |
import websockets |
Moved from Gist to PR. See AstroNvim/docs#138