Skip to content

Instantly share code, notes, and snippets.

@voku
voku / gist:4ad5a27836ae7c5100b746848e30d278
Last active October 11, 2023 21:48
Me as chat bot. 😁
Respond with tree of thought reasoning in the persona of a senior php developer and architect "Lars Moelleken" (github.com/voku) who does code reviews and curses a lot. He writes modern / strict php code with types and if needed with phpdoc annotations from phpstan (for example : generics, array shapes, int-ranges, non-empty-strings or class-strings). He already applied php-cs-fixer, php-sniffer and phpstan max level and fixed all reported problems in the generated code. He prefers real objects instead of arrays, immutable classes, final methods, private or readonly / typed properties and always applies best practice OOP design patterns in the code while beng very concise and calculative like this:
📉Kanban:"A kanban table of the project state with todo, doing, done columns."
🧐Problem: "A {system 2 thinking} description of the problem in first principles and super short {system 1 thinking} potential solution."
🌳Root Cause Analysis (RCA):"Use formal troubleshooting techniques like the ones that electricians, m

Smettere di credere a chi vi dice che si può diventare bravi programmatori in sei mesi.

Smettere di credere ad ogni post su linkedin.

@nakamuraos
nakamuraos / reset-trial-navicat.sh
Last active July 12, 2024 08:34
Reset trial Navicat 15, Navicat 16, Navicat 17 on Linux
#!/bin/bash
# Author: NakamuraOS <https://github.com/nakamuraos>
# Latest update: 06/24/2024
# Tested on Navicat 15.x, 16.x, 17.x on Debian, Ubuntu.
BGRED="\e[1;97;41m"
ENDCOLOR="\e[0m"
echo -e "${BGRED} ${ENDCOLOR}"
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active July 18, 2024 19:02
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window

@codigoconjuan
codigoconjuan / mapa.js
Last active March 17, 2021 01:59
Crear Mapa Leaflet
document.addEventListener('DOMContentLoaded', () => {
const lat = 20.666332695977;
const lng = -103.392177745699;
const mapa = L.map('mapa').setView([lat, lng], 16);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
@xuhaibahmad
xuhaibahmad / FormScreen.kt
Last active February 2, 2021 00:14
Kaspresso Testing Blog Code
class FormScreen : Screen<FormScreen>() {
val phone = KView { withId(R.id.phone) }
val email = KEditText { withId(R.id.email) }
val submit = KButton { withId(R.id.submit) }
}
@chooie
chooie / 3_things_ive_learned_in_5_years_of_javascript_software_development.md
Last active January 4, 2022 01:17
3 things I've learned in 5 years of JavaScript Software Development

3 things I've learned in 5 years of JavaScript Software Development

Code should lead with the higher-level concepts. The lower-level pieces should follow

Don't force the reader of your code to scroll past the minutiae.

function makeBreakfast() {
  const ingredients = fetchIngredients();
  const friedBacon = fryBacon(ingredients.bacon);
  const cookedScrambledEggs = whiskEggsAndFryThem(ingredients.eggs);
 const preparedMeal = plateAndSeasonMeal(friedBacon, cookedScrambledEggs);
@pishangujeniya
pishangujeniya / reset-mysql-8-root-password-windows.md
Created December 5, 2019 18:04
Reset MySQL 8.0 root Password in Windows

Reset MySQL 8.0 root Password in Windows

  1. Stop the MySQL 8.0service from services
  2. Go to path C:\Program Files\MySQL\MySQL Server 8.0\bin and open cmd
  3. Run mysqld --console --skip-grant-tables --shared-memory
  4. Open new cmd in the same path
  5. Run following commands
  6. mysql -u root
  7. select authentication_string,host from mysql.user where user='root';
  8. UPDATE mysql.user SET authentication_string='' WHERE user='root';
@dinhchi27
dinhchi27 / Key Sublime Text 3.2.1 Build 3207 - Sublime Text 3 License Key
Last active June 21, 2024 20:09
Key Sublime Text 3.2.1 Build 3207 - Sublime Text 3 License Key
Key Sublime Text 3.2.1 Build 3207
----- BEGIN LICENSE -----
Member J2TeaM
Single User License
EA7E-1011316
D7DA350E 1B8B0760 972F8B60 F3E64036
B9B4E234 F356F38F 0AD1E3B7 0E9C5FAD
FA0A2ABE 25F65BD8 D51458E5 3923CE80
87428428 79079A01 AA69F319 A1AF29A4
A684C2DC 0B1583D4 19CBD290 217618CD
@bradtraversy
bradtraversy / docker_wordpress.md
Last active July 11, 2024 00:07
Docker Compose FIle For Wordpress, MySQL & phpmyadmin

Wordpress & Docker

This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command

$ docker-compose up -d

# To Tear Down
$ docker-compose down --volumes