Skip to content

Instantly share code, notes, and snippets.

View marvinroger's full-sized avatar
👋

Marvin ROGER marvinroger

👋
View GitHub Profile
@igrr
igrr / ESP8266httpsUpdate.ino
Last active October 30, 2022 14:18
ESP8266 ota over HTTPS
/*
OTA update over HTTPS
As an example, we download and install ESP8266Basic firmware from github.
Requires latest git version of the core (November 17, 2015)
Created by Ivan Grokhotkov, 2015.
This example is in public domain.
*/
@ralphtheninja
ralphtheninja / JOBS.md
Last active April 28, 2021 00:38
Use JOBS=max to speed up native node modules

When npm installs native node modules it uses node-gyp to compile code. This is the seam node uses for targeting different operating systems, e.g. OS X, linux, Windows etc.

By default node-gyp compiles using one core and if you have more than one you probably want to utilize that power to speed up compile time. The way node-gyp handles this is by using the JOBS environment variable, which sets the jobs variable here. This piece of code then checks the value of jobs to determine how many cores to use.

Note that if the value of JOBS is max then all cores will be used. So lets try this on leveldown. First lets check that JOBS isn't set yet:

lms@ux301|01:34|~/src/leveldb-repos/leveldown (master) $ echo $JOBS

@dceejay
dceejay / nssm.md
Last active March 22, 2024 03:09
Running Node-RED as a service on Windows using NSSM

Running Node-RED as a service on Windows using NSSM

These instructions assume you installed Node-RED from an administrator enabled command prompt using the npm install -g node-red command to do so.

As an administrator, install nssm from https://nssm.cc/download

And then from the directory where you installed nssm, run the commands

mkdir c:\temp

nssm install Node-RED "c:\Users\"%USERNAME%"\AppData\Roaming\npm\node-red.cmd"

@pacuna
pacuna / composer.json
Created December 19, 2013 06:45
composer.json file for running Laravel 4 on dokku
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"laravel/framework": "4.1.*",
"way/generators": "dev-master",
"cartalyst/sentry": "2.0.*",
"jasonlewis/basset": "dev-master",
@davidjbradshaw
davidjbradshaw / checkMD5.sh
Created November 12, 2013 20:52
Shell scripts to check files against the MANIFEST file create by the grunt-hash-manifest plugin.
#!/bin/bash
#
SEQ=/usr/bin/seq
MANIFEST=( $( cat MANIFEST) )
for i in $($SEQ 0 2 $((${#MANIFEST[@]} - 1)))
do
localMD5=($(md5sum ${MANIFEST[$i]}))
@ungoldman
ungoldman / dokku_setup.md
Last active November 28, 2023 12:35
Deploy your own PaaS: Setting up Dokku with DigitalOcean and Namecheap

Deploy your own PaaS!

Setting up Dokku with DigitalOcean and Namecheap

..or how I made my own heroku in a few hours for $3.98.


This write-up is several years out of date! You probably shouldn't use it.