Skip to content

Instantly share code, notes, and snippets.

@nospam2k
nospam2k / parallels-reset.sh
Created June 1, 2021 15:22 — forked from gdurastanti/parallels-reset.sh
Reset Parallels' trial
#!/bin/sh
# Reset Parallels Desktop's trial and generate a casual email address to register a new user
rm /private/var/root/Library/Preferences/com.parallels.desktop.plist /Library/Preferences/Parallels/licenses.xml
jot -w pdu%[email protected] -r 1
@nospam2k
nospam2k / colorTempToRGB.js
Created August 21, 2020 04:09 — forked from paulkaplan/colorTempToRGB.js
Color Temperature to RGB
// From http://www.tannerhelland.com/4435/convert-temperature-rgb-algorithm-code/
// 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;
@nospam2k
nospam2k / README.md
Created March 27, 2020 18:38 — forked from jimothyGator/README.md
Nginx configuration for Mac OS X with Homebrew, using sites-enabled directory.
mkdir -p /usr/local/etc/nginx/sites-{enabled,available}
cd /usr/local/etc/nginx/sites-enabled
ln -s ../sites-available/default.conf
ln -s ../sites-available/default-ssl.conf

File locations:

  • nginx.conf to /usr/local/etc/nginx/
  • default.conf and default-ssl.conf to /usr/local/etc/nginx/sites-available
  • homebrew.mxcl.nginx.plist to /Library/LaunchDaemons/
@nospam2k
nospam2k / alsa_loopback_min.c
Created May 23, 2019 16:54 — forked from ferryzhou/alsa_loopback_min.c
A Minimal ALSA Loopback Program
#include <stdio.h>
#include <stdlib.h>
#include <alsa/asoundlib.h>
#define BUF_BYTES 128
int main (int argc, char *argv[]) {
int err;
unsigned char buf[BUF_BYTES];
@nospam2k
nospam2k / AccessPoint.ino
Created August 31, 2018 23:55 — forked from Cyclenerd/AccessPoint.ino
ESP8266 : Create a WiFi access point and provide a DNS and web server on it, catch all traffic
/* Create a WiFi access point and provide a web server on it. */
#include <ESP8266WiFi.h>
#include "./DNSServer.h" // Patched lib
#include <ESP8266WebServer.h>
const byte DNS_PORT = 53; // Capture DNS requests on port 53
IPAddress apIP(10, 10, 10, 1); // Private network for server
DNSServer dnsServer; // Create the DNS object
ESP8266WebServer webServer(80); // HTTP server