Skip to content

Instantly share code, notes, and snippets.

@dislokacia
dislokacia / Password visibility JetFormBuilder.js
Last active May 3, 2024 06:13
Password visibility JetFormBuilder
jQuery(document).ready(function( $ ){
$('.jet-form-builder input[type="password"]').each(function(){
let id = $(this).attr('id');
if($(this).length>0){
$(this).closest('div').append(`<label><input class="pass_vis" style="display:none;" type="checkbox" onclick="myFunction('${id}')"><i class="vis-icon fa fa-solid fa-eye"></i></label>`);
let offset = ($(this)[0].clientHeight - $('.vis-icon')[0].clientHeight)/2;
$(this).closest('div').css('position', 'relative');
$(this).siblings().css({
'position' : 'absolute',
'right' : '20px',
@thesephist
thesephist / options.oak
Created November 14, 2022 22:09
Collection of useful Stable Diffusion prompt modifiers
{ name: 'Lighting', options: [
'golden hour, warm glow'
'blue hour, twilight, ISO12000'
'midday, direct lighting, overhead sunlight'
'overcast, whitebox, flat lighting, diffuse'
'dreamlike diffuse ethereal lighting'
'dramatic lighting, dramatic shadows, illumination'
'studio lighting, professional lighting, well-lit'
'flash photography'
'low-key lighting, dimly lit'
@KrustyHack
KrustyHack / wgk.txt
Last active May 3, 2024 06:10
Windows Generic Keys
Windows Edition Product Key
Windows 7 Starter 7Q28W-FT9PC-CMMYT-WHMY2-89M6G
Windows 7 Home Basic YGFVB-QTFXQ-3H233-PTWTJ-YRYRV
Windows 7 Home Premium RHPQ2-RMFJH-74XYM-BH4JX-XM76F
Windows 7 Professional HYF8J-CVRMY-CM74G-RPHKF-PW487
Windows 7 Ultimate D4F6K-QK3RD-TMVMJ-BBMRX-3MBMV
Windows 7 Enterprise H7X92-3VPBB-Q799D-Y6JJ3-86WC6
Windows 7 Starter N D4C3G-38HGY-HGQCV-QCWR8-97FFR
Windows 7 Home Basic N MD83G-H98CG-DXPYQ-Q8GCR-HM8X2

Using dune-release to release OCaml packages

Originally written 2020-05-16

dune-release is a good improvement over the old opam-publish, but releasing software is still clearly not a solved problem, and I find it hard to remember the exact steps involved in releasing an opam package, especially if some time has passed since the last release. This note is an attempt at having a place

@wanglf
wanglf / vscode-extension-offline.md
Last active May 3, 2024 06:06
Download VS Code extensions as VSIX

How to use?

  • Copy content of vsix-bookmarklet, create a bookmark in your browser.
  • Navigate to the web page of the VS Code extension you want to install.
  • Click the bookmark you just created, then click the download button.
    download
  • After download finished, rename the file extension to *.vsix.
  • In VS Code, select Install from VSIX... in the extension context menu.
    vsc
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@drernie
drernie / csvtomap.go
Created March 10, 2017 22:48
Golang Convert CSV Records to Dictionaries using Header Row as Keys
// CSVToMap takes a reader and returns an array of dictionaries, using the header row as the keys
func CSVToMap(reader io.Reader) []map[string]string {
r := csv.NewReader(reader)
rows := []map[string]string{}
var header []string
for {
record, err := r.Read()
if err == io.EOF {
break
}
/* Copied, Pasted and summarized from ps' source code.
You can use sysctl to get other process' argv.
*/
#include <sys/sysctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define pid_of(pproc) pproc->kp_proc.p_pid
@MichaelHolley
MichaelHolley / prepare-commit-msg
Last active May 3, 2024 05:58
git-hook to include the ticket-number in the commit-message for feature- and fix-branches. Requiring the syntax of "feature/187-my-branch".
#!/usr/bin/env python
import sys
import re
from subprocess import check_output
print("Starting commit message hook...")
supported_branch_types = ["fix", "feature"]
regex = '(?<=\/)[0-9]+'
@imba-tjd
imba-tjd / .Cloud.md
Last active May 3, 2024 05:55
☁️ 一些免费的云资源

IaaS指提供系统(可以自己选)或者储存空间之类的硬件,软件要自己手动装;PaaS提供语言环境和框架(可以自己选);SaaS只能使用开发好的软件(卖软件本身);BaaS一般类似于非关系数据库,但各家不通用,有时还有一些其它东西。

其他人的集合