Skip to content

Instantly share code, notes, and snippets.

@abdelfattahradwan
abdelfattahradwan / .htaccess
Created December 29, 2022 15:29
.htaccess File for SvelteKit Single-Page-Applications
# Rewrite non /app/build/ requests to /app/build/
RewriteCond %{REQUEST_URI} !^/app/build/
RewriteRule ^(.*)$ /app/build/$1 [L]
# Rewrite requests to non-existing files/dirs to /app/build/index.html
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
@fzliu
fzliu / docker-compose.yml
Created June 23, 2021 04:12
Gitlab minimal memory installation via docker.
web:
image: 'gitlab/gitlab-ee:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
# Add any other gitlab.rb configuration here, each on its own line
puma['worker_processes'] = 0
sidekiq['max_concurrency'] = 10
@taniwallach
taniwallach / gist:f1f6c81ce19b7d68f74d4b71d1db57a2
Created February 24, 2020 15:21
Installing HP-107w on Linux (using HP's unified linux driver ULDLINUX_V1.00.39_00.12.zip)
HP provides a downloadable "driver" for Linux for the HP 107w printer but there are NO reasonable install instructions provided, and following the "obvious" install process did not get the printer working.
The closest I found to HP install instuctions once I knew more is https://support.hp.com/in-en/document/c05588857
Since I found this annoying and wasted more time on getting this printer working under Linux, I'm sharing a summary of what did work (on Debian 10).
1. Download the driver file from https://support.hp.com/us-en/drivers/selfservice/hp-laser-100-printer-series/24494339/model/24494342 from under the "Basic Drivers" menu for when the OS is set to Linux.
The current version now is: "HP Laser 100 and HP Color Laser 150 Printer series Print Driver V1.00.39:00.12 5.9 MB Mar 20, 2019"
@qutek
qutek / .gitlab-ci.yml
Last active February 12, 2024 18:26
[Gitlab CI With Rsync] Auto deploy gitlab CI with rsync
# https://gitlab.com/help/ci/quick_start/README
# https://docs.gitlab.com/ee/ci/introduction/
# https://docs.gitlab.com/ee/ci/yaml/
image: dpolyakov/docker-node-latest-with-rsync:latest
# before_script:
# - apt-get update -qq
# - apt-get install -qq git
@physacco
physacco / README.md
Last active December 27, 2023 09:05
Python 3 extension example

Python 3 extension example

Build

python3 setup.py build

Output: build/lib.macosx-10.11-x86_64-3.5/hello.cpython-35m-darwin.so

Run

@denji
denji / nginx-tuning.md
Last active November 25, 2024 13:51
NGINX tuning for best performance

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.

@wrburgess
wrburgess / gist:3711050
Created September 13, 2012 00:43
Permanently remove file from Git history

Reference

Remove sensitive files from Git/Github

In Terminal

git filter-branch --index-filter 'git rm --cached --ignore-unmatch [file path/name]' --prune-empty --tag-name-filter cat -- --all

Example: