Skip to content

Instantly share code, notes, and snippets.

View meszaros-lajos-gyorgy's full-sized avatar

Lajos Mészáros meszaros-lajos-gyorgy

View GitHub Profile
@meszaros-lajos-gyorgy
meszaros-lajos-gyorgy / release-an-npm-snapshot-package.md
Last active September 29, 2024 18:30
Process on how to release snapshot/alpha/beta versions of an NPM package as I always mix up the commands

Release process

Because I always forget how this stuff works.

This document uses alpha for snapshot prefixing, but feel free to replace it with beta or any other word that suits your development cycle.

First development snapshot

  1. npm version premajor|preminor|prepatch --preid=alpha - increases the major|minor|patch version with a -alpha.0 prefix
  2. git push --follow-tags
@meszaros-lajos-gyorgy
meszaros-lajos-gyorgy / bunny-clicker-autoclicker.js
Last active September 24, 2024 16:56
Bunny Clicker autoclicker
// https://orteil.dashnet.org/igm/index.html?g=/bunnyclicker
// make sure you are in the outermost frame
const playerFrame = document.querySelector('iframe#player').contentDocument
// -------------------------------------------------------
// auto-click the lucky bunny
const luckyWrapper = playerFrame.getElementById('shinies')
setInterval(() => {
# Creating cert for local testing
**1** Create `security/localhost.conf` with the following content:
```
[req]
default_bits = 2048
prompt = no
default_md = sha256
distinguished_name = req_dn
@meszaros-lajos-gyorgy
meszaros-lajos-gyorgy / curry.php
Created April 27, 2017 10:26
Curry for php functions
<?php
function curry($func, $params = []){
return function() use ($func, $params){
$reflection = new ReflectionFunction($func);
$neededArgNum = count($reflection->getParameters());
$args = array_merge($params, func_get_args());
$argNum = count($args);
if($argNum >= $neededArgNum){