Skip to content

Instantly share code, notes, and snippets.

View en9inerd's full-sized avatar
:octocat:
Coding just for fun

Vladimir Loskutov en9inerd

:octocat:
Coding just for fun
View GitHub Profile
[{"id":"5a7d710eff9ddb36","type":"tab","label":"Get new posts from blog","disabled":false,"info":"","env":[]},{"id":"5470137f70f4ca7a","type":"feedparse","z":"5a7d710eff9ddb36","name":"","url":"https://enginerd.io/feed.xml","interval":"15","ignorefirst":true,"x":200,"y":140,"wires":[["814eb66a93a3e2e8"]]},{"id":"814eb66a93a3e2e8","type":"html","z":"5a7d710eff9ddb36","name":"","property":"payload","outproperty":"paragraphs","tag":"p","ret":"html","as":"single","x":170,"y":260,"wires":[["9c52eb61bd7cdaa6"]]},{"id":"29eb8d41a3eb35c6","type":"function","z":"5a7d710eff9ddb36","name":"get summary","func":"const summary = [];\nconst cleanedUpPayload = msg.payload.replace(/\\n/g, '').trim();\nconst publishedPosts = (cleanedUpPayload) ? cleanedUpPayload.split(',') : [];\nlet readMore = false;\n\nif (publishedPosts.includes(msg.topic)) return [null, null];\n\nfor (let i = 0; i < msg.paragraphs.length; i++) {\n summary.push(msg.paragraphs[i]);\n if (msg.paragraphs[i].includes('<!--more-->')) {\n summary[i]
@en9inerd
en9inerd / index.html
Created March 30, 2024 19:33
Memory Address Manipulator
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Memory Address Manipulator</title>
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
</head>
@en9inerd
en9inerd / discovery.ts
Last active November 11, 2023 05:17
Dynamic module discovery using json5 and glob
import { access, readFile } from 'fs/promises';
import { join, resolve, dirname } from 'path';
import { TSConfig } from './types';
import { sync as globSync } from 'glob';
import { parse as parseJSON } from 'json5';
import { DiscoveryError } from './exceptions';
async function getRootAppDir(): Promise<string> {
const appDir = process.env.PWD;
if (appDir) {
@en9inerd
en9inerd / git_committer_replacer
Last active December 20, 2021 06:24
committer email fix
git filter-branch --commit-filter '
if [ "$GIT_COMMITTER_EMAIL" = "<old-email>" ];
then
GIT_COMMITTER_NAME="<name>";
GIT_AUTHOR_NAME="<name>";
GIT_COMMITTER_EMAIL="<noreply-email>";
GIT_AUTHOR_EMAIL="<noreply-email>";
git commit-tree "$@";
else
git commit-tree "$@";
@en9inerd
en9inerd / .zshrc
Last active April 12, 2024 01:54
tanner.terminal & .zshrc
HISTFILE=~/.zsh_history
HISTSIZE=10000
SAVEHIST=10000
setopt append_history
setopt share_history
setopt inc_append_history
# Make ls use colors
export CLICOLOR=1
alias ls='ls -Fa'

Keybase proof

I hereby claim:

  • I am en9inerd on github.
  • I am en9inerd (https://keybase.io/en9inerd) on keybase.
  • I have a public key ASAOMHm-al1UBszC3dthkSH9zV_zEL2XmHtxCfgxCVSFzwo

To claim this, I am signing this object: