Skip to content

Instantly share code, notes, and snippets.

View honsa's full-sized avatar
💭
I am just a human

honsa.ch honsa

💭
I am just a human
View GitHub Profile
@honsa
honsa / ngrok-selfhosting-setup.md
Created April 27, 2023 16:38 — forked from lyoshenka/ngrok-selfhosting-setup.md
How to setup Ngrok with a self-signed SSL cert

Intro

The plan is to create a pair of executables (ngrok and ngrokd) that are connected with a self-signed SSL cert. Since the client and server executables are paired, you won't be able to use any other ngrok to connect to this ngrokd, and vice versa.

DNS

Add two DNS records: one for the base domain and one for the wildcard domain. For example, if your base domain is domain.com, you'll need a record for that and for *.domain.com.

Different Operating Systems

laragon-multi-php-version-via-package-manager

Manage your php version via Laragon PHP UI switcher with help of powershell package manager.

For this sake ill be using https://github.com/mlocati/powershell-phpmanager) package manage to handle multi version instead of download the zip file manually. The reason why i want to using this package manager is because it easy for me to add new extension like how linux and mac do. For example, installing imagick on windows is such a hassle. Not to mention if you keep switching your laptop or pc it could make it hard to just install all back without any semi or automated script laying around.

@honsa
honsa / valet.conf
Created March 15, 2022 15:34 — forked from poul-kg/valet.conf
CORS Rules for Laravel Valet Nginx
# To enable CORS you should add lines with CORS rules below to your valet.conf file
# Find the file /usr/local/etc/nginx/valet/valet.conf - this is Valet conf for Nginx
# of try to execute `locate valet.conf` and find the `valet.coinf` in `nginx` subdirectory
# after you edit your valet.conf do not forget to execute `valet restart`
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 128M;
@honsa
honsa / nginx-tuning.md
Created November 30, 2021 20:00 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@honsa
honsa / finder-navigation-karabiner.json
Last active December 1, 2021 14:32
Karabiner Elements Finder Improved Navigation
{
"title": "Finder improved navigation",
"rules": [
{
"description": "Use F2 as Rename and set onedit",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "f2"
@honsa
honsa / index.html
Created April 6, 2021 20:31
Monkey Island CSS Animation (without JS)
<div id="sky">
<div id="sea">
<div id="gb"></div>
</div>
</div>
<audio id="song" autoplay>
<source src="http://scummbar.com/mi2/MI1-CD/26%20-%20Monkey%20Island%20-%20Rock%20Remix%202.mp3">
</audio>
@honsa
honsa / index.html
Created April 6, 2021 19:18
Monkey Island CSS Animation (without JS)
<div id="sky">
<div id="sea">
<div id="gb"></div>
</div>
</div>
<audio id="song" autoplay>
<source src="http://scummbar.com/mi2/MI1-CD/26%20-%20Monkey%20Island%20-%20Rock%20Remix%202.mp3">
</audio>

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r
@honsa
honsa / light-shader.shader
Created October 11, 2020 11:02 — forked from hiulit/light-shader.shader
Godot 3 light interact with shader
shader_type canvas_item;
uniform vec4 dawn_color : hint_color = vec4(0.86, 0.70, 0.70, 1.0);
uniform vec4 day_color : hint_color = vec4(1.0, 1.0, 1.0, 1.0);
uniform vec4 dusk_color : hint_color = vec4(0.59, 0.66, 0.78, 1.0);
uniform vec4 night_color : hint_color = vec4(0.07, 0.09, 0.38, 1.0);
uniform float brightness : hint_range(0.0, 10.0, 0.01) = 1.0;
uniform float contrast : hint_range(0.0, 10.0, 0.01) = 1.0;
uniform float saturation : hint_range(0.0, 10.0, 0.01) = 1.0;
@honsa
honsa / css-animation-walking-man.markdown
Created September 6, 2020 06:37
CSS animation (walking man)

CSS animation (walking man)

Bernard Bernoulli (The Day of the Tentacle) walking with CSS animations over Monkey Island background, using CSS3 steps() and audio HTML5 (add autoplay to audio tag for play sound).

Forked from Manz's Pen Monkey Island CSS Animation.

A Pen by honsa on CodePen.

License.