Skip to content

Instantly share code, notes, and snippets.

@tprelog
tprelog / enable-docker.sh
Last active October 30, 2024 20:38
Use docker-compose on TrueNAS SCALE 22.12 (Bluefin) without Kubernetes
#!/usr/bin/env bash
#
# Enable docker and docker-compose on TrueNAS SCALE (no Kubernetes)
#
# This script is a hack! Use it at your own risk!!
# Using this script to enable Docker is NOT SUPPORTED by ix-systems!
# You CANNOT use SCALE Apps while using this script!
#
# 1 Create a dedicated Docker dataset in one of your zpools
@cellularmitosis
cellularmitosis / Makefile
Last active August 31, 2024 13:32
A Lisp interpreter in C, part 1: symbols
CC=gcc -g -std=c99 -Wall -Werror -D_POSIX_C_SOURCE=200809L
lisp: main.o forms.o reader.o eval.o printer.o repl.o
$(CC) -o lisp *.o
main.o: main.c
$(CC) -c main.c
forms.o: forms.h forms.c
$(CC) -c forms.c
@runo280
runo280 / 00readme.md
Last active September 29, 2020 11:36
Download script for [email protected] free courses

How to use

1- Install requirements

This command is for Ubuntu based distros

sudo apt install aria2 youtube-dl

2- Make [course_name].sh file excutable:

chmod +x [course_name].sh

@excid3
excid3 / dynamic-nginx-module-ubuntu-18.04.sh
Created June 20, 2018 17:58
How to compile a dynamic nginx module for Ubuntu 18.04
# Install dependencies that nginx was originally compiled with
sudo apt install libperl-dev libgeoip-dev libgd-dev
# Get the nginx source
wget https://nginx.org/download/nginx-1.14.0.tar.gz
tar zxf nginx-1.14.0.tar.gz
# Get the module source
wget https://github.com/fdintino/nginx-upload-module/archive/master.zip
unzip master.zip
@fredy-mederos
fredy-mederos / KoinJavaUtils.kt
Created March 27, 2018 19:00
Koin java utility functions to inject components and properties in java classes.
package com.common.utils
import org.koin.KoinContext
import org.koin.standalone.StandAloneContext
import kotlin.jvm.internal.Reflection
/**
* @author @fredy_mederos
*/
@stkent
stkent / android-bluetooth-low-energy-resources.md
Last active August 1, 2024 08:47
Android Bluetooth Low Energy (BLE) Resources
@contolini
contolini / beginners-guide.md
Last active August 2, 2021 21:01
Beginner's guide to IoT (Internet of Things) and the ESP8266

Beginner's guide to building IoT devices

The gist

Ever heard of an Arduino? It's a $35 microcontroller that lets you write code that interacts with motors and lights and IRL stuff. Well, there's a $2 version that has all the same features and is the size of a postage stamp. It's call the ESP8266.

The ESP8266

ESP8266 is an inexpensive wifi-enabled SoC made by the company Espressif. It was released in 2014 with very little documentation but its low cost motivated hardware hackers around the world to explore and document the module. Online communities formed to discuss the chip and how to build with it.

@carloseduardosx
carloseduardosx / AutoIncrementEntity.java
Last active January 18, 2021 05:36
RealmAutoIncrement is a singleton which maintain the last id saved from each database model
package com.carloseduardo.model;
import com.carloseduardo.constants.KnownClasses;
import com.carloseduardo.exception.UnknownModelException;
import io.realm.RealmObject;
import io.realm.annotations.PrimaryKey;
import io.realm.annotations.Required;
/**
@cecilemuller
cecilemuller / letsencrypt_2020.md
Last active September 29, 2024 08:31
How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SSL rating)

How to setup Let's Encrypt for Nginx on Ubuntu 18.04 (including IPv6, HTTP/2 and A+ SLL rating)


Virtual hosts

Let's say you want to host domains first.com and second.com.

Create folders for their files:

@raiym
raiym / DeviceAdminInteractor.java
Last active February 21, 2023 07:54
Activate KNOX Standard SDK Demo
public class DeviceAdminInteractor {
private static final String LOG_TAG = DeviceAdminInteractor.class.getName();
// Can be dev and production key
private static final String ELM_LICENSE_KEY
= "SECRETKEY";
public ComponentName componentName;
private DevicePolicyManager devicePolicyManager;
/**
* Samsung KNOX Standard SDK related variables