Skip to content

Instantly share code, notes, and snippets.

@ndlrx
ndlrx / dnscrypt-proxy.md
Last active March 25, 2025 22:03
Install dnscrypt-proxy on Archlinux or Manjaro

Step 1 - Install and Configure dnscrypt-proxy

sudo su
pacman -S dnscrypt-proxy
cd /etc/dnscrypt-proxy/
@SkeLLLa
SkeLLLa / vscode-update.sh
Created July 9, 2018 09:52
VScode linux update script
#!/usr/bin/env bash
APPLICATIONS_PATH="$HOME/Applications"
CODE_PATH="$APPLICATIONS_PATH/VSCode"
DOWNLOAD_URL="https://vscode-update.azurewebsites.net/latest/linux-x64/stable"
echo "Downloading $DOWNLOAD_URL..."
DOWNLOAD_PATH=$(mktemp)
curl -L $DOWNLOAD_URL --output $DOWNLOAD_PATH
echo "Downloaded to $DOWNLOAD_PATH"
@f5io
f5io / core.js
Last active September 7, 2023 18:38
An approach to async middleware for raw `http` in Node.
const http = require('http');
const methods = [ 'get', 'put', 'post', 'delete', 'head' ];
const isStream = obj =>
obj &&
typeof obj === 'object' &&
typeof obj.pipe === 'function';
const isReadable = obj =>
@denji
denji / nginx-tuning.md
Last active October 24, 2025 16:02
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.

@BrianGenisio
BrianGenisio / gist:6621396
Created September 19, 2013 10:00
ng-if modified to not create a child scope. (note my-if)
app.directive('myIf', ['$animate', function($animate) {
return {
transclude: 'element',
priority: 1000,
terminal: true,
restrict: 'A',
compile: function (element, attr, transclude) {
return function ($scope, $element, $attr) {
var childElement, childScope;
$scope.$watch($attr.myIf, function ngIfWatchAction(value) {