Skip to content

Instantly share code, notes, and snippets.

View purag's full-sized avatar

Purag Moumdjian purag

View GitHub Profile
@purag
purag / wpforms_maybe_insert_single_item_controls.php
Last active August 16, 2024 23:06
Add plus and minus buttons to WPForms "Single Item" field quantity selector
<?php
// Insert Plus and Minus buttons on eligible Single Item fields.
function wpforms_maybe_insert_single_item_controls() {
?>
<script type="text/javascript">
const select = document.querySelector('.wpforms-insert-single-item-controls select');
function getSelector(direction) {
return (event) => {
event.preventDefault();
@purag
purag / strace.txt.353
Created January 27, 2018 12:46
wsl rm hanging
execve("/bin/rm", ["rm", ".git/index.lock"], [/* 50 vars */]) = 0
brk(NULL) = 0x11dd000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fc703fe0000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=35246, ...}) = 0
mmap(NULL, 35246, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fc703fe6000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
@purag
purag / pacman.html
Last active October 28, 2017 19:02
PacMan with Wick (http://wickeditor.com)
This file has been truncated, but you can view the full file.
<!--
You've peeked inside the source code for a Wick project... you are clever!
This file was generated by the WickProject exporter.
(see src/editor/WickProject.Exporter.js) at https://github.com/zrispo/wick/
Send any questions to https://twitter.com/zrispo !!!
-->
<head>
@purag
purag / easing.js
Last active March 18, 2019 17:29
A collection of simple easing functions for JavaScript
let easing = {
// classic linear
linear: t => t,
// slow -> fast
easeInQuad: t => t*t,
easeInCubic: t => t*t*t,
easeInQuint: t => t*t*t*t,
// fast -> slow
@purag
purag / keybase.md
Created August 23, 2016 18:02
Keybase oh yeah

Keybase proof

I hereby claim:

  • I am purag on github.
  • I am purag (https://keybase.io/purag) on keybase.
  • I have a public key ASCIqR0yHkIKwak6H4shhmsyYPmnxswuF-W5KmZ9o8iZewo

To claim this, I am signing this object: