Skip to content

Instantly share code, notes, and snippets.

@shadyonline
shadyonline / idea-gcg1.vmoptions
Created May 11, 2022 14:33 — forked from mahmoudimus/idea-gcg1.vmoptions
A running timeline of my IntelliJ on Steroids with GC tuning
-ea
-server
-Xss256k
-Xms4G
-Xmx4G
-XX:+IgnoreUnrecognizedVMOptions
-XX:+UnlockExperimentalVMOptions
-XX:+HeapDumpOnOutOfMemoryError
-XX:-OmitStackTraceInFastThrow
-XX:-UseSerialGC
@shadyonline
shadyonline / buildspec.yml
Created January 18, 2022 16:08 — forked from leepa/buildspec.yml
A buildspec for CodeBuild... for cross platform building with buildx - enjoy :)
version: 0.2
phases:
install:
runtime-versions:
docker: 19
commands:
- docker version
- curl -JLO https://github.com/docker/buildx/releases/download/v0.4.2/buildx-v0.4.2.linux-amd64
- mkdir -p ~/.docker/cli-plugins

Raspberry Pi 2/3B/B+/4B Wireless Bridge using Ubuntu Server 18.04 ARM Image and Netplan

The initial goal of this project is to use the raspberry pi in place of my Wireless Range Extender and then going from 3 wireless networks (2.4ghz, 2.4ghz extended, 5ghz) at home to only one (5ghz). This way I'm reducing the exposition to radio waves for the whole familly at home.

Let's go technical

Ok, enough drama for now, let's go technical. 😁

Setup

@shadyonline
shadyonline / php speed up tips.html
Created January 24, 2021 20:07 — forked from bsalim/php speed up tips.html
63 Tips for speeding up PHP
<html>
<body>
<p>Here are Webber’s points:</p>
<ul>
<li>If a method can be static, declare it static. Speed improvement is by a factor of 4.</li>
<li>echo is faster than print.(<em>* compare with list from phplens by John Lim</em>)</li>
<li>Use echo’s multiple parameters instead of string concatenation.</li>
<li>Set the maxvalue for your for-loops before and not in the loop.</li>
<li>Unset your variables to free memory, especially large arrays.</li>
<li>Avoid magic like __get, __set, __autoload</li>
@shadyonline
shadyonline / README.md
Created January 6, 2021 21:39 — forked from mikoim/README.md
[Updated! Aug 14 2020] YouTube recommended encoding settings on ffmpeg (+ libx264)

Parameters

Container: MP4

Parameter YouTube recommends setting
-movflags faststart moov atom at the front of the file (Fast Start)

Video codec: H.264

@shadyonline
shadyonline / check-if-css-loaded.js
Created December 26, 2020 22:48 — forked from cvan/check-if-css-loaded.js
check if a CSS stylesheet has loaded
var linkEl = document.head.querySelector('link[href*="/styles/index.css"]');
var cssLoaded = Boolean(linkEl.sheet);
linkEl.addEventListener('load', function () {
cssLoaded = true;
});
@shadyonline
shadyonline / android-backup-apk-and-datas.md
Created October 6, 2020 19:41 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications:

@shadyonline
shadyonline / hostapd.conf
Created January 8, 2020 22:42 — forked from thatbudakguy/hostapd.conf
hostapd configuration for a 5ghz wireless network.
interface=(INTERFACE HERE)
driver=nl80211
ssid=(SSID HERE)
hw_mode=a
channel=36
country_code=US
ignore_broadcast_ssid=0
wpa=2
@shadyonline
shadyonline / haproxy.conf
Created October 23, 2019 23:46 — forked from nateware/haproxy.conf
HAProxy sample config for EC2
#
# This config file is a combination of ideas from:
# http://www.37signals.com/svn/posts/1073-nuts-bolts-haproxy
# http://www.igvita.com/2008/05/13/load-balancing-qos-with-haproxy/
# http://wiki.railsmachine.com/HAProxy
# http://elwoodicious.com/2008/07/15/nginx-haproxy-thin-fastcgi-php5-load-balanced-rails-with-php-support/
# http://upstream-berlin.com/2008/01/09/using-haproxy-with-multiple-backends-aka-content-switching/
# http://wiki.railsmachine.com/HAProxy
# http://gist.github.com/raw/25482/d39fb332edf977602c183194a1cf5e9a0b5264f9
#
@shadyonline
shadyonline / gist:ba3ca935945be0adb9f5bd2b2ee03f47
Created October 23, 2019 23:44 — forked from vincentbernat/gist:1163077
haproxy configuration for SSL benchmark
global
maxconn 100000
defaults
option http-server-close
option dontlognull
option redispatch
option contstats
retries 3
timeout connect 5s