./push-window.sh <top|right|bottom|left>...
for example
$ ./push-window top right
$ ./push-window left| local http = require"ssl.https" | |
| local url = require"socket.url" | |
| local json = require"cjson" | |
| local token = os.getenv("TOKEN") | |
| local tguri = "https://api.telegram.org/bot"..token | |
| local last_update_id = 0 | |
| local function process_update(update) | |
| if not update.message then return end |
In order to make it work, supply OPENWEATHER_APP_ID environment variable, which you must get from https://openweathermap.org/
and, optionally, OPENWEATHER_LOCATION, otherwise script will grab your IP-based geolocation using https://ip-api.com.
| import org.yaml.snakeyaml.Yaml | |
| import java.io.* | |
| import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar | |
| import org.jetbrains.kotlin.gradle.tasks.KotlinCompile | |
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| maven("https://plugins.gradle.org/m2/") | |
| } |
| -- Put this somewhere in init.lua | |
| if vim.fn.has"unix" then | |
| -- Listen for :help call from .desktop python script | |
| pcall(vim.fn.serverstart, "localhost:" .. (vim.env.NVIM_LISTEN_PORT or 6969)) | |
| end |
| package main | |
| import ( | |
| "context" | |
| "encoding/json" | |
| "fmt" | |
| "log" | |
| "net/http" | |
| "gopkg.in/tucnak/telebot.v2" |
| def test1: | |
| ... | |
| return True | |
| def test2: | |
| if test1: | |
| .... | |
| return True |
| {-# LANGUAGE LambdaCase #-} | |
| import Data.Char ( isDigit | |
| , isSpace | |
| ) | |
| data Op = Add | Sub | Mul | Div deriving (Eq, Show) | |
| data Item a | |
| = Value a |
| use regex::Regex; | |
| use rmpv::{decode::read_value, encode::write_value, Value}; | |
| use std::{net::TcpStream, path::PathBuf, sync::atomic}; | |
| macro_rules! rmp_vec { | |
| () => (Value::Array(Vec::new())); | |
| ($($x:expr),+$(,)*) => (Value::from([$(Value::from($x)),+].to_vec())); | |
| } | |
| struct Client { |
| #!/usr/bin/env sh | |
| filepath=${1} | |
| signature=${2:-"signature.txt"} | |
| privkey=${3:-"private_key.pem"} | |
| pubkey=${4:-"public_key.pem"} | |
| binsgn="${signature}.bin" | |
| openssl genrsa -out $privkey 2048 | |
| openssl rsa -in $privkey -pubout -out $pubkey | |
| openssl dgst -sign $privkey \ |