Skip to content

Instantly share code, notes, and snippets.


Alex Solomaha CyanoFresh

View GitHub Profile

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
kocisov /
Last active Jul 22, 2021
How to setup next.js app on nginx with letsencrypt
tom-- / Random bytes, ints, UUIDs in
Last active Oct 8, 2020
PHP random bytes, integers and UUIDs
View Random bytes, ints, UUIDs in

Random bytes, ints, UUIDs in PHP

Simple and safe random getters to copy-paste

string randomBytes( int $length )

int randomInt ( int $min , int $max )

string randomUuid ( void )
jtrefry /
Last active Jul 10, 2021
Configuring Windows 10 (64-bit) for npm and node-gyp
  • Install Git for Windows
  • Install Node
  • Install Python 2.7.3
  • Install Microsoft Visual Studio 2015 Community
  • Open the command prompt as Administrator, run the following commands, then close the command prompt (a new prompt is required before the new environment variables will be available)
    • npm install -g npm
      • (Upgrades to npm v3, which no longer nests dependencies indefinitely. No more "maximum path length exceeded" errors due to the 260 character path limit in Windows, or needing to delete node_modules with rimraf.)
    • setx PYTHON C:\Python27\python.exe /m
      • (May need to change path to your custom install directory.)
  • Open a new command prompt and run the following commands. If these install without errors, you have bypasse
thoop / nginx.conf
Last active Jul 2, 2021
Official nginx.conf for nginx
View nginx.conf
# Change YOUR_TOKEN to your prerender token
# Change (server_name) to your website url
# Change /path/to/your/root to the correct value
server {
listen 80;
root /path/to/your/root;
index index.html;
nikmartin / A: Secure Sessions Howto
Last active Jun 17, 2021
Secure sessions with Node.js, Express.js, and NginX as an SSL Proxy
View A: Secure Sessions Howto
Secure sessions are easy, but not very well documented.
Here's a recipe for secure sessions in Node.js when NginX is used as an SSL proxy:
The desired configuration for using NginX as an SSL proxy is to offload SSL processing
and to put a hardened web server in front of your Node.js application, like:
Edit for express 4.X and >: Express no longer uses Connect as its middleware framework, it implements its own now.
paulkaplan / colorTempToRGB.js
Last active Jul 11, 2021
Color Temperature to RGB
View colorTempToRGB.js
// From
// Start with a temperature, in Kelvin, somewhere between 1000 and 40000. (Other values may work,
// but I can't make any promises about the quality of the algorithm's estimates above 40000 K.)
function colorTemperatureToRGB(kelvin){
var temp = kelvin / 100;
martinsik / chat-frontend.js
Last active Jul 10, 2021
Node.js chat frontend and server
View chat-frontend.js
$(function () {
"use strict";
// for better performance - to avoid searching in DOM
var content = $('#content');
var input = $('#input');
var status = $('#status');
// my color assigned by the server
var myColor = false;