Skip to content

Instantly share code, notes, and snippets.

View Vaisakhkm2625's full-sized avatar

Vaisakh K M Vaisakhkm2625

  • <-- you don't need to know :)
View GitHub Profile
@zhanglongqi
zhanglongqi / tree_model_pyqt4.py
Last active July 26, 2024 10:32
PyQt tree model
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
longqi 20/Jan/16 22:42
"""
"""
default.txt
"""
"""
@liaohuqiu
liaohuqiu / gist:4ee77b9b03afcdecc80252252378d367
Created June 9, 2016 00:38
Find out the full duration time of a YouTube playlist
var list = document.getElementsByClassName('pl-video-time');
var time = 0;
function toS(hms) {
var a = hms.split(':');
while (a.length < 3) {
a.unshift(0);
}
var seconds = (+a[0]) * 60 * 60 + (+a[1]) * 60 + (+a[2]);
return seconds;
import string
alphabet = string.ascii_lowercase
key1 = '95 83 96 67 56 56 64 92 92 30 85 82 38 81 61 86 48 92 71 79 64 87 87 65 17'
key2 = '76 72 84 63 41 36 45 84 73 18 84 63 30 73 60 77 28 69 66 65 44 62 73 51 12'
print(''.join((map(lambda x: alphabet[int(x[0]) - int(x[1]) - 1], zip(key1.split(' '), key2.split(' '))))))
@RKursatV
RKursatV / onekoRace.sh
Last active June 14, 2024 04:35
A script generates 100 random oneko characters with random colors and random magnitude of speed
#!/bin/bash
type oneko >/dev/null 2>&1 || { echo >&2 "I require oneko but it's not installed. Aborting."; exit 1; }
array[0]="sakura"
array[1]="tomoyo"
array[2]="neko"
array[3]="dog"
array[4]="tora"
allcolorsS=$(awk -F ' ' '{print $4}' /etc/X11/rgb.txt | tr "\n" " ");
@chaorace
chaorace / sn-vimify.user.js
Last active October 19, 2024 11:42
Userscript to enable Vim mode in most ServiceNow script fields. Also dynamically resizes the editor to fit content
// ==UserScript==
// @name SNOW CodeMirror Vim activator & embiggener
// @description Enables vim mode for ServiceNow in most script editor fields. Also enlarges the field!
// @namespace https://gist.githubusercontent.com/chaorace/dc49a18f876a9814c8b27d637bfb4f44/raw/sn-vimify.user.js
// @updateURL https://gist.githubusercontent.com/chaorace/dc49a18f876a9814c8b27d637bfb4f44/raw/sn-vimify.user.js
// @supportURL https://gist.github.com/chaorace/dc49a18f876a9814c8b27d637bfb4f44
// @include http://*.service-now.com/*
// @include https://*.service-now.com/*
// @require https://codemirror.net/3/keymap/vim.js
// @run-at document-idle
@academo
academo / ww
Last active December 26, 2023 10:46
#!/bin/bash
# Usage: ww -f "window class filter" -c "run if not found"
# Usage: ww -fa "window title filter" -c "run if not found"
## Find and contribute to a more updated version https://github.com/academo/ww-run-raise
POSITIONAL=()
while [[ $# -gt 0 ]]; do
key="$1"
@Vaisakhkm2625
Vaisakhkm2625 / clipboard.md
Last active November 12, 2024 23:09
clipboard type

Type from clipboard

A simple script to simulate keypresses to type copied text, in places where pasting is not enabled and don't have access to install new apps

(Remote or local virtual desktops, various online forms, ssh connection through old terminal emulators etc)

😅 A lot of people are using this, but couldn't get anyone to star this repo...

image

@sashalikesplanes
sashalikesplanes / config.lua
Last active October 24, 2023 15:06
Harpoon X Bufferline Neovim
-- This example shows how to integrate Bufferline with Harpoon
-- The goal is to get bufferline to show only the files marked by harpoon, with the correct number
-- I use <C-w>{1..N} to navigate between the harpoon buffers, my harpoon config is also included
-- I have also setup an autocommand in order to open all the harpoon buffers when launching neovim, it is at the bottom of the file
-- NOTE: this guide relies on you using the lazy package manager
-- bufferline.nvim
-- helper functions:
local function get_marked_buffers()
local mark = require("harpoon.mark")