Skip to content

Instantly share code, notes, and snippets.

View chaseadam's full-sized avatar

Adam Chasen chaseadam

View GitHub Profile
@zeevro
zeevro / README.md
Last active November 8, 2021 08:30
Pebble SDK installation script

Now that Pebble servers are gone, some old components in the SDK need to be patched or replaced so they can fetch what they need from Rebble.

This script downloads and installes everything needed to build projects and also run the emulator.

Was tested on Ubuntu 18.04.2 on WSL.

@ahmadnassri
ahmadnassri / twilio-functions-sms-to-email.js
Created November 2, 2018 04:33
Twilio Functions: SMS to Email Twilio with SendGrid Client
// import sendgrid library
const sendgrid = require('@sendgrid/client')
// target email address
const email = '[email protected]'
// sms email domain
const domain = 'sms.domain.tld'
exports.handler = function (context, event, done) {
@abn
abn / 00-lenovo-x1-5th-gen-thinkfan-setup.md
Last active September 22, 2024 19:19
Fedora thinkfan configuration for Lenovo X1 Carbon (5th Gen)

Thinkfan Configuration Notes

This are notes for configuration thinkfan for Fedora. This configuration procedure was followed on a Lenovo Thinkpad X1 Carbon (5th Gen) running Fedora 25.

Non standard (default) configuration was required for this machine as the default sensors are not available. Eg: /proc/acpi/ibm/thermal does not exist for this model.

An annoted configuration file has been included below. However, there is no guarentee that this will work as-is on every machine.

Installation

dnf -y install thinkfan
@cweilguny
cweilguny / docker-compose-gitlab.yml
Last active October 27, 2021 00:55
A docker-compose config in v3 format for nginx-proxy with separate containers for nginx, dockergen and letsencrypt-companion. Additional example on how to get GitLab docker container running with this nginx-proxy setup. You need to create the docker network before, just run 'docker network create nginx-proxy'. Docker will tell you so if you don'…
version: '3'
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
nginx['listen_port'] = 80
@thomo
thomo / user_dht22_influxdb.lua
Last active October 16, 2017 13:46
ESP-01 + DHT22: send temperature and humidity to influxdb
--
-- send DHT22 sensor values to influxdb database
--
LOCATION = "upstairs.bathroom"
-- #################################
INFLUXDB_HOST = "sun.thomo.de"
INFLUXDB_DB = "lhw5"
@chaeplin
chaeplin / WPA2 -EAP-TLS.ino
Last active January 6, 2022 13:50
WPA2 -EAP-TLS.ino
/*
WPA2-ENT EAP-TLS
based on joostd's code : https://github.com/joostd/esp8266-eduroam
https://github.com/joostd/esp8266-eduroam/blob/master/gen_cert.sh
wifi_station_set_cert_key
Function: Set certificate and private key for connecting to WPA2-ENTERPRISE AP.
Note:
• Connecting to WPA2-ENTERPRISE AP needs more than 26 KB memory, please ensure enough space (system_get_free_heap_size).
@mesgarpour
mesgarpour / appsScript_ListFilesFolders_ver.2.js
Last active September 11, 2024 03:48
[Google Apps Script] List all files & folders in a Google Drive folder, & write into a speadsheet
/*
* Copyright 2017 Mohsen Mesgarpour
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@igniteflow
igniteflow / corsdevserver.py
Created April 22, 2013 15:34
A simple CORS compliant web server in Python, useful for development (with @alex-moon)
import BaseHTTPServer
import cgi
from pprint import pformat
PORT = 6969
FILE_TO_SERVE = 'path/to/your/response/content.json'
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""