Skip to content

Instantly share code, notes, and snippets.

View MartinN3's full-sized avatar

Martin Novák MartinN3

  • Staffers
  • Czech Republic
  • 10:44 (UTC +02:00)
View GitHub Profile
@stuartw1
stuartw1 / install-openvpn3-kali.sh
Last active January 26, 2025 11:18
install openvpn3 and dependencies on Kali Linux
#!/bin/bash
# The following commands should install openvpn3 successfully on Kali Linux as of 2023-10-11
# Please check libssl1.1 version is newest at https://packages.debian.org/bullseye/amd64/libssl1.1
# PM me if broken and I will update
# Thanks to the following for bug reports / additions
# asingh-lp, Pyr0technicien
# update packages
sudo apt update
@vanxh
vanxh / .dockerignore
Last active April 16, 2024 22:18
Dockerfile to deploy NextJS using yarn v3 (berry) PnP.
Dockerfile
.dockerignore
node_modules
npm-debug.log
README.md
# .next
.git
.DS_Store
.yarn/*
!.yarn/cache
@enGMzizo
enGMzizo / html_entity_decode.js
Last active January 14, 2023 10:25
html_entity_decode in nodejs / javascript
const entities = require('./text_entities')
const html_entity_decode = (text) =>
text.replace(
/&([a-z0-9]+|#[0-9]{1,6}|#x[0-9a-f]{1,6});/gi,
(t) => (entities[t] && entities[t].characters) || t
);
console.log(
html_entity_decode(
@hungneox
hungneox / WIN10.MD
Last active May 20, 2025 18:43
How Make a Windows 10 USB Using Your Mac - Build a Bootable ISO From Your Mac's Terminal

Most new PCs don't come with DVD drives anymore. So it can be a pain to install Windows on a new computer.

Luckily, Microsoft makes a tool that you can use to install Windows from a USB storage drive (or "thumbdrive" as they are often called).

But what if you don't have a second PC for setting up that USB storage drive in the first place?

In this tutorial we'll show you how you can set this up from a Mac.

Step 1: Download the Windows 10 ISO file

You can download the ISO file straight from Windows. That's right - everything we're going to do here is 100% legal and sanctioned by Microsoft.

@joshangell
joshangell / PhpStorm-and-Gridsome.md
Last active December 21, 2022 10:13
Quick and dirty explanation of how to get autocomplete, syntax highlighting etc when using Gridsome in PhpStorm.

PhpStorm

  1. Make sure your gridsome dev server is running: cd frontend and then yarn dev or npm run dev
  2. Install JS GraphQL plugin: https://jimkyndemeyer.github.io/js-graphql-intellij-plugin/
  3. Select everything inside <page-query>, click the light bulb icon, choose "Inject language or reference" and select GraphQL, like this:

NOTE: you only have to do this once and then all your .vue files will support GraphQL queries inside <page-query> tags.

@russfeld
russfeld / picam-stream.sh
Last active November 28, 2024 12:23
Stream Raspberry Pi Camera to Twitch
#!/bin/bash
# =================================================================
# Stream configuration file for Raspberry Pi Camera
#
# @author Russell Feldhausen ([email protected])
# @version 2019-06-05
#
# This set of commands should allow you to stream video from your
# Raspberry Pi Camera to Twitch and Youtube (and possibly other
@zulhfreelancer
zulhfreelancer / golang.md
Created October 30, 2018 19:37
Run all Go files except tests

Run all Go files except tests

$ go run $(ls -1 *.go | grep -v _test.go)

OR

$ go run !(*_test).go
@rossta
rossta / initializers:hello.js
Last active November 12, 2020 19:45
Webpack with require.context
console.log('initializer hello.js');
@bouroo
bouroo / softether.sh
Last active May 12, 2025 03:54
Install softether vpn server on ubuntu 16.04+
#!/usr/bin/env bash
# SoftEther VPN Server Installer Script
# Register vultr.com with free credit https://www.vultr.com/?ref=9206731-8H
# Create VPS
# Tested on Ubuntu 18.04, Debian 10.0
# Instructions:
# 1. Save this file as softether-installer.sh
# 2. chmod +x softether-installer.sh
# 3. Run: ./softether-installer.sh or bash softether-installer.sh
# 4. Initialize VPN server config: /usr/local/vpnserver/vpncmd
@moritzmhmk
moritzmhmk / rpi_camera_v4l2_ffmpeg.md
Last active December 17, 2024 12:05
using raspberry pi camera with ffmpeg (hardware accelerated)

Using Raspberry Pi Camera with ffmpeg

Capturing video from the rpi camera with ffmpeg can vary from less than 5% to 100% of the CPU (rpi zero) depending on ffmpeg using the hardware acceleration or not.

On many github issues one finds the suggestion of using h264_omx codec to use the gpu - but it does not ship with the default ffmpeg on Raspbian.

Instead I found that one can use the v4l2 driver provided by raspbian to get hardware accelerated h264 output. Also setting the video size will save one from using a (cpu) scale filter.

ffmpeg

capture h264 video from rpi camera