Skip to content

Instantly share code, notes, and snippets.

View Eisa01's full-sized avatar

Eisa AlAwadhi Eisa01

View GitHub Profile
@TheAMM
TheAMM / display_eta.lua
Last active April 29, 2022 07:57
Simple mpv Lua script for displaying the expected end time for the current file
--[[
Simple script to display the end-time for the current file.
Example input.conf bind:
E script-message display-eta
]]--
local utils = require("mp.utils")
local SCRIPT_COMMAND_NAME = 'display-eta'
function display_eta()
@webarthur
webarthur / pure-slidedown-slideup.css
Last active December 7, 2024 09:59
Pure CSS slidedown / slideup animation using transform translateY
.slide-up, .slide-down {
overflow:hidden;
}
.slide-up > div, .slide-down > div {
transform: translateY(-100%);
transition: .4s ease-in-out;
}
.slide-down > div {
transform: translateY(0);
}
@ethack
ethack / TypeClipboard.md
Last active March 26, 2025 08:39
Scripts that simulate typing the clipboard contents. Useful when pasting is not allowed.

It "types" the contents of the clipboard.

Why can't you just paste the contents you ask? Sometimes pasting just doesn't work.

  • One example is in system password fields on OSX.
  • Sometimes you're working in a VM and the clipboard isn't shared.
  • Other times you're working via Remote Desktop and again, the clipboard doesn't work in password boxes such as the system login prompts.
  • Connected via RDP and clipboard sharing is disabled and so is mounting of local drives. If the system doesn't have internet access there's no easy way to get things like payloads or Powershell scripts onto it... until now.

Windows

The Windows version is written in AutoHotKey and easily compiles to an executable. It's a single line script that maps Ctrl-Shift-V to type the clipboard.

function Add-EnvPath {
param(
[Parameter(Mandatory=$true)]
[string] $Path,
[ValidateSet('Machine', 'User', 'Session')]
[string] $Container = 'Session'
)
if ($Container -ne 'Session') {
-- betterchapters.lua
-- Loads the next or previous playlist entry if there are no more chapters in the seek direction.
-- To bind in input.conf, use: <keybind> script_binding <keybind name>
-- Keybind names: chapter_next, chapter_prev
-- Recommended to use with autoload.lua
function chapter_seek(direction)
local chapters = mp.get_property_number("chapters")
local chapter = mp.get_property_number("chapter")
if chapter == nil then chapter = 0 end
@ocean90
ocean90 / box-shadow.html
Last active March 11, 2025 11:31
CSS3 Box Shadow, only top/right/bottom/left and all
<!DOCTYPE html>
<html>
<head>
<title>Box Shadow</title>
<style>
.box {
height: 150px;
width: 300px;
margin: 20px;