Skip to content

Instantly share code, notes, and snippets.

@krishaantechnology
krishaantechnology / tailwind.config.js
Created February 12, 2023 01:25
Tailwind CSS: Shake Animation
const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
purge: [
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
'./resources/js/**/*.vue',
],
@profburnes
profburnes / Estruturas_HTML5.md
Last active April 24, 2024 20:04
Estrutura e Tags Básicas do HTML 5

Estruturas e Tags Básicas do HTML5

O HTML5 é a nova versão padrão do HTML com novas Tags e APIs capazes de inserir facilmente um arquivo de audio ou vídeo em um site. Basicamente o HTML seria o esqueleto do seu site, que deverá ser formatado (ou vestido) utilizando a linguagem CSS (Cascading Style Sheet).

Estrutura Básica

A estrutura básica do HTML5 é parecida as estrutra do XHTML e do HTML 4, contendo elementos HEAD e BODY.

<!DOCTYPE html>
@reluce
reluce / prepare_ubuntu_template.sh
Last active April 24, 2024 20:04
Prepare Ubuntu 22.04 Cloud Image and Template for Proxmox
# All commands will be executed on a Proxmox host
sudo apt update -y && sudo apt install libguestfs-tools -y
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img
# Install qemu-guest-agent on the image. Additional packages can be specified by separating with a comma.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent
# Read and set root user password from file.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --root-password file:password_root.txt
# Create an additional user.
sudo virt-customize -a jammy-server-cloudimg-amd64.img --run-command "useradd -m -s /bin/bash myuser"
# Set password for that user.
@igorbabko
igorbabko / settings.json
Created April 23, 2024 11:13
VS Code Settings [2024-04-23]
{
"workbench.iconTheme": "material-icon-theme",
"workbench.colorTheme": "Aura Dracula Spirit (Soft)",
"workbench.activityBar.location": "hidden",
"workbench.tree.enableStickyScroll": false,
"workbench.tree.renderIndentGuides": "none",
"workbench.sideBar.location": "right",
"workbench.editor.showTabs": "single",
"workbench.layoutControl.enabled": false,
"workbench.startupEditor": "none",
@andresr-dev
andresr-dev / gitignore.txt
Last active April 24, 2024 19:57
This is how you can create a .gitignore file in your Xcode projects in order to avoid problems with git
This is how to create a .gitignore file in the root file of our Xcode project, this is used to ignore saving certain files that are not necessary in our project, like the files that Xcode automatically generates after each build as DerivedData/ and build/. Saving these files causes unnecessary work and makes it harder to find the significant changes in our commit history. Here's the Terminal commands:
If this is the first time you are doing this, you are going to need to run this command, Important: This is a one-time-only command for each computer:
git config --global alias.ignore '!gi() { curl -L -s https://www.gitignore.io/api/$@ ;}; gi'
Now for each project, do this after creating the project:
1. cd -> drag the Xcode project file to terminal in order to get the path
2. git ignore swift,macos >.gitignore
3. git add .gitignore
4. git commit -m "Add .gitignore file"
@RyanEwen
RyanEwen / etc_default_klipper
Last active April 24, 2024 19:56
Run Klipper + Moonraker + Mainsail + KlipperScreen on an Android device using Linux Deploy
# Configuration for /etc/init.d/klipper
KLIPPY_USER=android
KLIPPY_CONFIG=/home/$KLIPPY_USER/klipper_config/printer.cfg
KLIPPY_LOG=/home/$KLIPPY_USER/klipper_logs/klippy.log
KLIPPY_SOCKET=/tmp/klippy_uds
KLIPPY_PRINTER=/tmp/printer
KLIPPY_EXEC=/home/$KLIPPY_USER/klippy-env/bin/python
KLIPPY_ARGS="/home/$KLIPPY_USER/klipper/klippy/klippy.py $KLIPPY_CONFIG -l $KLIPPY_LOG -a $KLIPPY_SOCKET"
@theodorosploumis
theodorosploumis / Nework_throttling_profiles.md
Last active April 24, 2024 19:53
Web development - Custom network throttling profiles
Profile download (kb/s) upload (kb/s) latency (ms)
Native 0 0 0
GPRS 50 20 500
56K Dial-up 50 30 120
Mobile EDGE 240 200 840
2G Regular 250 50 300
2G Good 450 150 150
3G Slow 780 330 200
@nir9
nir9 / chat-client.c
Created January 14, 2024 00:17
Minimalist Chat Server and Client in C - just for fun, not suitable for production
#include <sys/socket.h>
#include <stdio.h>
#include <arpa/inet.h>
#include <poll.h>
#include <unistd.h>
int main() {
int sockfd = socket(AF_INET, SOCK_STREAM, 0);
struct sockaddr_in address = {