Skip to content

Instantly share code, notes, and snippets.

@Semant1ka
Semant1ka / how_to_setup_hotspot.md
Last active May 8, 2024 06:39
How to set up WiFi hotspot and troubleshoot WiFi problems on Debian

There are a few decent tutorials on how to setup hotspot on Linux, which I will share below, but this tutorial will focus on adversities that you without doubt will face while setting up your AP.

For AP setup we will need:

  • Hostapd utility
  • Some dhcp utility
  • A bit of patience (that was for my case)

How do I know that my WiFi adapter supports AP mode?

In terminal type sudo iw list this command will show info about your wifi interfaces. Look for Supported interface entry, if AP is in it, that means your Wifi devices support hotspot mode.

@Pathoschild
Pathoschild / stardew-mod-recommendations.md
Last active May 8, 2024 06:37
Stardew Valley mod recommendations

Here are the mods I recommend. These are all compatible with the latest versions of SMAPI and Stardew Valley on Linux/macOS/Windows. See the player's guide to using mods if you're interested.

Quality of life

I think the best mods are those which improve the game while maintaining its balance, lore, and style.

  • AutoGate
    Gates open automatically when you approach and close behind you.

  • Better Sprinklers Plus
    Customise the sprinkler radius, with a proportional change to their cost. If you're willing to mine all the ores you'll need, that makes the basic sprinklers useful early in the game and lets you do more than just watering crops every day.

@jrknox1977
jrknox1977 / ollama_dspy.py
Created February 9, 2024 18:06
ollama+DSPy using OpenAI APIs.
# install DSPy: pip install dspy
import dspy
# Ollam is now compatible with OpenAI APIs
#
# To get this to work you must include `model_type='chat'` in the `dspy.OpenAI` call.
# If you do not include this you will get an error.
#
# I have also found that `stop='\n\n'` is required to get the model to stop generating text after the ansewr is complete.
# At least with mistral.
@wojteklu
wojteklu / clean_code.md
Last active May 8, 2024 06:36
Summary of 'Clean code' by Robert C. Martin

Code is clean if it can be understood easily – by everyone on the team. Clean code can be read and enhanced by a developer other than its original author. With understandability comes readability, changeability, extensibility and maintainability.


General rules

  1. Follow standard conventions.
  2. Keep it simple stupid. Simpler is always better. Reduce complexity as much as possible.
  3. Boy scout rule. Leave the campground cleaner than you found it.
  4. Always find root cause. Always look for the root cause of a problem.

Design rules

@bitterteasweetorange
bitterteasweetorange / keybindings.json
Last active May 8, 2024 06:33
setup vscode like neovim
[
{
"command": "projectManager.listGitProjects#sideBarGit",
"key": "cmd+o"
},
{
"command": "expand_region",
"key": "ctrl+=",
"when": "editorTextFocus"
},
@fridzema
fridzema / laravel-octane-on-forge.md
Last active May 8, 2024 06:32
Laravel octane(swoole) on forge / ubuntu server

Laravel

Configure octane laravel/octane

Server

PHP

Install swoole extension (place in corresponding .ini file(s)):

pecl install swoole
@peter-leonov
peter-leonov / lazy-list.js
Created May 21, 2017 21:07 — forked from gvergnaud/lazy-list.js
Lazy List, implemented with es6 generators
/* ----------------------------------------- *
Lazy List Implementation
* ----------------------------------------- */
// Haskell-like infinite List, implemented with es6 generators
// Lazyness lets you do crazy stuff like
List.range(0, Infinity)
.drop(1000)
.map(n => -n)
@timpamungkas
timpamungkas / docker-compose.yml
Created April 22, 2022 01:47
Docker compose for kafka & ksqldb
version: "3"
networks:
kafka-net:
name: kafka-net
driver: bridge
services:
zookeeper:
image: docker.io/bitnami/zookeeper:3.8
@dangovorenefekt
dangovorenefekt / blockmetatwitter.md
Last active May 8, 2024 06:29
Block Meta and Twitter (nginx)
@abdisaDev
abdisaDev / undo commits
Created November 27, 2023 04:54
wanna undo commits?
git reset --hard HEAD^ # To remove last commit
git reset --hard HEAD~3 # To remove last 3 commits