Skip to content

Instantly share code, notes, and snippets.

@Blackshome
Blackshome / sensor-light.yaml
Last active May 2, 2024 18:36
Home Assistant Sensor Light that can be used in Blueprints
blueprint:
name: Sensor Light
description: >
# 💡 Sensor Light
**Version: 6.5**
Your lighting experience, your way - take control and customize it to perfection! 💡✨
@silassare
silassare / fix-esm-import-paths.js
Created July 21, 2022 09:58
Browse a folder and try to change all esm import `from`, by auto prefixing `.js` or `/index.js` only if this file exists.
import * as fs from 'fs';
import * as path from 'path';
// https://gist.github.com/lovasoa/8691344
async function* walk(dir) {
for await (const d of await fs.promises.opendir(dir)) {
const entry = path.join(dir, d.name);
if (d.isDirectory()) {
yield* walk(entry);
} else if (d.isFile()) {
@wyyder
wyyder / Create new user in Linux
Created January 25, 2020 07:19
To create a new user with sudo permission in Kali Linux
# Add user.
useradd -m username
# -m creates a home directory for the user.
# Set Password.
passwd username
# Set user group to sudo.
usermod -a -G sudo username
# -a option to add and ‘-G sudo’ means to add the user to the sudo group.
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@Vicky2618
Vicky2618 / Mathematics_for_Engineers.md
Created May 2, 2024 18:33 — forked from yewalenikhil65/Mathematics_for_Engineers.md
This is a collection of resources of mathematics for engineering students

General guideline for a student pursuing engineering but interested in mathematics

  1. Linear Algebra

    • Book by Gilbert strang
    • Essence of linear algebra videos - 3Blue1Brown
    • Book by Lyod Trefethen and David Bau (for bit different perspective but in more depth that Gilbert strang)
    • Book by Hoffman and Kunze
    • Book by Sheldon Axler .. Linear Algebra done right
  • video lecture playlist based on book by Sheldon axler
@nemotoo
nemotoo / .gitattributes
Last active May 2, 2024 18:33
.gitattributes for Unity3D with git-lfs
## Unity ##
*.cs diff=csharp text
*.cginc text
*.shader text
*.mat merge=unityyamlmerge eol=lf
*.anim merge=unityyamlmerge eol=lf
*.unity merge=unityyamlmerge eol=lf
*.prefab merge=unityyamlmerge eol=lf
@yewalenikhil65
yewalenikhil65 / Mathematics_for_Engineers.md
Last active May 2, 2024 18:33
This is a collection of resources of mathematics for engineering students

General guideline for a student pursuing engineering but interested in mathematics

  1. Linear Algebra

    • Book by Gilbert strang
    • Essence of linear algebra videos - 3Blue1Brown
    • Book by Lyod Trefethen and David Bau (for bit different perspective but in more depth that Gilbert strang)
    • Book by Hoffman and Kunze
    • Book by Sheldon Axler .. Linear Algebra done right
  • video lecture playlist based on book by Sheldon axler
@fnky
fnky / ANSI.md
Last active May 2, 2024 18:33
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@DanielSWolf
DanielSWolf / Program.cs
Last active May 2, 2024 18:33
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@choco-bot
choco-bot / 1.RegistrySnapshot.xml
Created May 2, 2024 16:53
thumbsremover v1.6.1.280 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<registrySnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<user>S-1-5-21-3166082273-3713568515-573898151-1000</user>
<keys>
<key installerType="InnoSetup" displayName="Thumbs Remover" displayVersion="1.6.1.280">
<RegistryView>Registry64</RegistryView>
<KeyPath>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{CD3423F8-F651-41DE-AA3C-0BF2A2EF505A}_is1</KeyPath>
<DefaultValue />
<InstallLocation><![CDATA[C:\Program Files\Thumbs Remover\]]></InstallLocation>
<UninstallString><![CDATA["C:\Program Files\Thumbs Remover\unins000.exe" /SILENT]]></UninstallString>