Skip to content

Instantly share code, notes, and snippets.

@lukecyca
lukecyca / gist:9f88aad1b6473047ec7a0d5a8afd37fe
Created July 19, 2020 18:18
Capture data from MrCool Cielo mini split
import requests
import json
session = requests.Session()
def login(username, password):
# Initial request - get session id
r = session.get('https://smartcielo.com/')
//
// CloudCompositingView.swift
// OpenSwiftUIDesigns
//
// Created by Amos Gyamfi on 9.4.2024.
//
import SwiftUI
struct CloudCompositingView: View {
//
// DateTimeTimerView..swift
import SwiftUI
struct DateTimeTimerView: View {
var body: some View {
NavigationStack {
List {
// 1. Month, day, year
//
// MeasuringHeartRate.swift
import SwiftUI
struct MeasuringHeartRate: View {
@State var measuring = false
let streamBlue = Color(#colorLiteral(red: 0, green: 0.3725490196, blue: 1, alpha: 1))
let streamRed = Color(#colorLiteral(red: 1, green: 0, blue: 0, alpha: 1))
//
// SignatureAnimation.swift
// OpenSwiftUIAnimations
//
// Created by Amos Gyamfi on 11.5.2024.
//
import SwiftUI
struct SignatureAnimation: View {
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar</title>
<style>
.scroll-box {
position: relative;
width: 300px; /* Adjust to fit your design */
#ifndef NOISE_SIMPLEX_FUNC
#define NOISE_SIMPLEX_FUNC
/*
Description:
Array- and textureless CgFx/HLSL 2D, 3D and 4D simplex noise functions.
a.k.a. simplified and optimized Perlin noise.
The functions have very good performance
and no dependencies on external data.
@davidjguru
davidjguru / intro_drupal_8_9_getting_taxonomy_terms_from_different_levels_programmatically.md
Last active May 12, 2024 21:22
Drupal 8 || 9 - Getting Taxonomy Terms from different levels programmatically

Introduction

In this snippet I've gathered some examples and cases about how to get taxonomy terms programmatically in Drupal, using always the same method and the same mechanics: get terms and then processing it in order to get only the required under certain criteria.

Author

@rveitch
rveitch / sass-7-1-pattern.scss
Last active May 12, 2024 21:18
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@rjescobar
rjescobar / extend-trial-jetbrains-windows.bat
Created August 31, 2021 02:53
JetBrains IDE trial reset windows
REM Delete eval folder with licence key and options.xml which contains a reference to it
for %%I in ("WebStorm", "IntelliJ", "CLion", "Rider", "GoLand", "PhpStorm", "Resharper", "PyCharm") do (
for /d %%a in ("%USERPROFILE%\.%%I*") do (
rd /s /q "%%a/config/eval"
del /q "%%a\config\options\other.xml"
)
)
REM Delete registry key and jetbrains folder (not sure if needet but however)
rmdir /s /q "%APPDATA%\JetBrains"