Skip to content

Instantly share code, notes, and snippets.

@yifanzz
yifanzz / code-editor-rules.md
Created December 17, 2024 00:01
EP12 - The One File to Rule Them All

[Project Name]

Every time you choose to apply a rule(s), explicitly state the rule(s) in the output. You can abbreviate the rule description to a single word or phrase.

Project Context

[Brief description ]

  • [more description]
  • [more description]
  • [more description]
@evgenyneu
evgenyneu / setup_cursor_ubuntu.md
Last active May 19, 2025 09:17
Install Cursor AI code editor on Ubuntu 24.04 LTS

Install Cursor AI editor on Ubuntu 24.04

  1. Use the Download button on www.cursor.com web site. It will download the NAME.AppImage file.

  2. Copy the .AppImage file to your Applications directory

cd ~/Downloads
mkdir -p ~/Applications
mv NAME.AppImage ~/Applications/cursor.AppImage
# coding=utf-8
# Copyright 2023 The HuggingFace Inc. team. All rights reserved.
#
# 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
@eddiez9
eddiez9 / parse.py
Created December 28, 2022 04:48
Parses putty NAND dump log for information we care about
with open('dump.log') as file:
save = False
for line in file:
# Do we save this line?
if line.isspace():
continue
elif ("------------------ block: 1117" in line):
save = False
continue
elif ("------------------ block:" in line):
@thedroidgeek
thedroidgeek / nokia-router-cfg-tool.py
Last active May 18, 2025 05:46
Nokia/Alcatel-Lucent router backup configuration tool
#!/usr/bin/env python3
#
# Nokia/Alcatel-Lucent router backup configuration tool
#
# Features:
# - Unpack/repack .cfg files generated from the backup and restore functionnality
# in order to modify the full router configuration
# - Decrypt/encrypt the passwords/secret values present in the configuration
@bmaupin
bmaupin / free-database-hosting.md
Last active May 13, 2025 10:49
Free database hosting
@1duo
1duo / centos.install.cmake.from.source.md
Last active April 26, 2025 17:18
Install CMake on CentOS 7.

Download CMake from: https://cmake.org/download/

wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz

Compile from source and install

tar zxvf cmake-3.*
@ageek
ageek / DS18B20_LCD_demo.ino
Created March 3, 2018 05:54 — forked from brooksware2000/DS18B20_LCD_demo.ino
Example sketch for DS18B20 temperature sensors using the DallasTemperature library. Prints results to an I2C LCD.
/*
Demonstration sketch for DS18B20 temperature sensors using the DallasTemperature library.
Reads temperature (Celsius) and temperature (Fahrenheit). Displays results to I2C LCD.
*/
#include <LCD.h> // I2C LCD
#include <Wire.h> // I2C
#include <OneWire.h> // One-wire devices
#include <DallasTemperature.h> // DS18B20
@smijar
smijar / centos7-eth0-steps.snippets
Last active December 10, 2021 02:32
Steps on how to rename Centos 7 ethnxxxx interface to eth0
centos 7 setup-rename NIC to eth0
http://ask.xmodulo.com/change-network-interface-name-centos7.html
- This is achieved by editing /etc/default/grub and adding "net.ifnames=0" to GRUB_CMDLINE_LINUX variable.
- Then run this command to regenerate GRUB configuration with updated kernel parameters.
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
- cat /sys/class/net/*/address