Skip to content

Instantly share code, notes, and snippets.

@Jekins
Jekins / Markdown-docs.md
Last active April 24, 2024 13:18
Руководство по оформлению Markdown файлов

Руководство по оформлению Markdown файлов

Markdown - это облегчённый язык разметки, который преобразует текст в структурированный HTML. Следующее руководство поможет вам разобраться, как использовать Markdown.

Заголовки

# Заголовок первого уровня
## Заголовок второго уровня
### Заголовок третьего уровня
#### Заголовок четвёртого уровня
##### Заголовок пятого уровня
@FFKL
FFKL / cell-ellipsis.css
Last active April 24, 2024 13:17
Auto-resizable ellipsis without fixed width 😮
.ellipsis {
position: relative;
}
.ellipsis:before {
content: ' ';
visibility: hidden;
}
.ellipsis span {
@mrded
mrded / csrf.js
Last active April 24, 2024 13:17
AngularJS: add csrf token to angular http requests
angular.config(function($httpProvider) {
var authToken = $('meta[name="csrf-token"]').attr('content');
$httpProvider.defaults.headers.common["X-CSRF-TOKEN"] = authToken;
});
@polster
polster / iptables-config.sh
Last active April 24, 2024 13:16
iptables: Sample Configuration
#!/bin/sh
# Abort script when command exits with error
set -e
# Print each command before it is executed (only for debugging)
#set -x
########################################################################
# Config
@leonvanrooijen
leonvanrooijen / RefreshApp.php
Last active April 24, 2024 13:16
Laravel GIT pull command to automatically update the application
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Symfony\Component\Process\Process;
class RefreshApp extends Command
{
/**
@guvener
guvener / tw-background-hex.md
Created April 30, 2022 08:46
Tailwind background colors HEX codes

I've recently joined Amazon Dublin from India and got opportunities to interview with Meta London, Zalando Berlin & some other companies. I extensively researched about companies hiring internationally which support visa & relocation for Tech roles. So sharing list of companies:

Do consider to STAR, if it helped you.

London

@jo-chemla
jo-chemla / kapture-cropper.py
Last active April 24, 2024 13:13
Quick utility to crop a kapture images and adapt intrinsics
# py kapture-cropper.py -i dataset-kapture\ --border_px 0 --scale_factor 1 -v
import kapture
import kapture.io.csv as csv
from PIL import Image
from kapture.io.csv import kapture_to_dir
import os, logging, argparse
import kapture.utils.logging
logger = logging.getLogger("kapture-cropper")
@VARKALASAIVIGNESH
VARKALASAIVIGNESH / CODE1.txt
Created April 24, 2024 13:12
Extract data from Resume and CV
import docx2txt
import re
import os
import xlsxwriter
import zipfile
def find_emails_and_phones(text):
emails = re.finditer(r'[a-zA-Z0-9-\.]+@[a-zA-Z-\.]*\.(com|edu|net)', text)
phones = re.finditer(r'\d{10}', text)
return emails, phones
@arshednabeel
arshednabeel / vicsek.py
Last active April 24, 2024 13:11
A minimal implementation of the Vicsek model in ~50 lines of code
import numpy as np
from tqdm import trange
def get_neighbour_matrix(x, L, R):
dx = np.subtract.outer(x[:, 0], x[:, 0])
dy = np.subtract.outer(x[:, 1], x[:, 1])
dx[dx > (L / 2) ** 2] -= (L / 2) ** 2
dy[dy > (L / 2) ** 2] -= (L / 2) ** 2
pair_dist = dx ** 2 + dy ** 2