Skip to content

Instantly share code, notes, and snippets.

View paulocoghi's full-sized avatar
🎯
Focusing

Paulo Coghi paulocoghi

🎯
Focusing
View GitHub Profile
@guest271314
guest271314 / javascript_engines_and_runtimes.md
Last active April 21, 2024 06:12
A list of JavaScript engines, runtimes, interpreters

V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++. It is used in Chrome and in Node.js, among others. It implements ECMAScript and WebAssembly, and runs on Windows 7 or later, macOS 10.12+, and Linux systems that use x64, IA-32, ARM, or MIPS processors. V8 can run standalone, or can be embedded into any C++ application.

SpiderMonkey is Mozilla’s JavaScript and WebAssembly Engine, used in Firefox, Servo and various other projects. It is written in C++, Rust and JavaScript. You can embed it into C++ and Rust projects, and it can be run as a stand-alone shell. It can also be [compiled](https://bytecodealliance.org/articles/making-javascript-run-fast-on

@tschifftner
tschifftner / fail2ban-cleanup.sh
Last active March 30, 2021 15:59
Clean fail2ban database from older entry - use script with cronjob!
#!/usr/bin/env bash
# Tobias Schifftner, @tschiffnter
#
# Usage:
# bash fail2ban-cleanup.php <fail2ban.sqlite3>
FILE=${1:-"/var/lib/fail2ban/fail2ban.sqlite3"}
[ -f "$FILE" ] || { echo "$FILE not found"; exit 1; }
@Rich-Harris
Rich-Harris / what-is-svelte.md
Last active March 27, 2024 06:09
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

@qwtel
qwtel / getFiles.js
Last active September 9, 2023 13:43
[node.js 8+] Recursively get all files in a directory
// Node 8+
// --------------------------------------------------------------
// No external dependencies
const { promisify } = require('util');
const { resolve } = require('path');
const fs = require('fs');
const readdir = promisify(fs.readdir);
const stat = promisify(fs.stat);
@miguelmota
miguelmota / events.js
Created June 21, 2017 04:23
JavaScript class extend EventEmitter
const EventEmitter = require('events')
class MyClass extends EventEmitter {
constructor() {
super() // required
this.emit('event', 100)
}
}
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@eddieantonio
eddieantonio / example.py
Created March 30, 2017 20:43
Zero-dependency Python 3 and Node IPC using UNIX sockets
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import socket
import json
server_address = '/tmp/example.sock'
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(server_address)
@mitchellkrogza
mitchellkrogza / fail2ban-reset-log-db.sh
Last active June 25, 2022 13:36
Bash script to reset Fail2Ban - clears / truncates log file and deletes the sqlite database - stops and restarts service during this process.
#!/bin/bash
# Bash Script by https://gist.github.com/mitchellkrogza
# ************************************************************
# This script clears the log file and database of Fail2Ban
# This resets Fail2Ban to a completely clean state
# Useful to use after you have finished testing all your jails
# and completed your initial setup of Fail2Ban and are now
# putting the server into LIVE mode
# ************************************************************
@maop
maop / soyoustart.py
Created December 10, 2015 02:11
Python Script for watching SoYouStart.com server availability, it can watch many servers at many datacenters and notify by email
#!/usr/bin/env python
# I was in a hurry for a SYS server so i make this quick script,
# notice that you have to use codes from the "us" version, since server's id
# are different in the Europe versions of ovh sites
# You'll receive notification mails like this:
#
# 141cabk1 | BK-8T: Intel i3 2130 2c/4t 3.4 GHz+ 8 GB 2x4 TB SATA
# AVAILABLE (1H-low) in gra
# AVAILABLE (1H-low) in sbg
@that0n3guy
that0n3guy / gist:905c812c0f65e7ffb5ec
Last active December 20, 2023 11:13
Mautic nginx config
server {
# see: http://wiki.nginx.org/Pitfalls
# see: http://wiki.nginx.org/IfIsEvil
listen 80;
root /app;
index index.html index.htm index.php;
error_page 404 /index.php;
# Make site accessible from http://set-ip-address.xip.io