Skip to content

Instantly share code, notes, and snippets.

  • we dont use @input to save changes as it will reset the cursor, so we use @blur instead
<td contenteditable dir="auto"
    v-html="someText"
    @keydown.enter.prevent
    @input="newEntry()"
    @blur="saveNewValue($event)">
</td>
@shivamkr19
shivamkr19 / download-egghead-io-videos.md
Last active February 4, 2022 09:48
Download free egghead.io videos

Download free egghead.io videos

Download Egghead.io videos using Lynx Browser and youtube-dl. This method will only work for videos that do not require a pro account.

Prerequesits

You need a Unix/Linux box with Lynx console browser and Youtube-dl installed.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active June 6, 2025 06:19
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@lobster1234
lobster1234 / localstack.md
Last active August 8, 2023 20:06
Working with localstack on command line

Starting localstack

C02STG51GTFM:localstack mpandit$ make infra
. .venv/bin/activate; exec localstack/mock/infra.py
Starting local dev environment. CTRL-C to quit.
Starting local Elasticsearch (port 4571)...
Starting mock ES service (port 4578)...
Starting mock S3 server (port 4572)...
Starting mock SNS server (port 4575)...
@CodeMyUI
CodeMyUI / demo-css-scroll-down-button.markdown
Created February 1, 2017 04:28
demo:CSS scroll down button
@nagelflorian
nagelflorian / buckets.tf
Last active November 22, 2024 13:19
Terraform config for static website hosting on AWS
# AWS S3 bucket for static hosting
resource "aws_s3_bucket" "website" {
bucket = "${var.website_bucket_name}"
acl = "public-read"
tags {
Name = "Website"
Environment = "production"
}
@janus57
janus57 / pi-hole-setup-methode-with-bind9.md
Created November 26, 2016 18:34
Pi-Hole with bind9 as forwarder

Installation of bind9

apt install bind9

Create a virtual interface (eth0:1)

Note: i have the IP : 192.168.1.109 by DHCP

edit the network settings file

@orottier
orottier / RetryTest.php
Last active July 21, 2023 10:10
Retry function for PHP with exponential backoff
<?php
class RetryTest extends TestCase
{
public function setUp()
{
parent::setUp();
// abuse superglobal to keep track of state
$_GET['a'] = 0;
}
@bavensky
bavensky / ESP8266 with 20x4 i2c LCD.ino
Last active February 13, 2024 13:01
ESP8266 with 20x4 i2c LCD [Arduino IDE]
// ESP8266 with 20x4 i2c LCD
// Compatible with the Arduino IDE 1.6.4
// Library https://github.com/fdebrabander/Arduino-LiquidCrystal-I2C-library
// Bavensky :3
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x20,20,4);
@paulochf
paulochf / countries.sql
Last active April 26, 2024 09:50 — forked from adhipg/countries.sql
Outdated. Used with discretion. Accepting updates.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;