Skip to content

Instantly share code, notes, and snippets.

@Marley-Mulvin-Broome
Marley-Mulvin-Broome / freq.py
Created October 16, 2023 15:06
Get the frequency of Japanese words in text with Python
#!/usr/bin/env python3
# full explanation at marley-web.dev/blog/japanese-frequency-list
from jpfreq.jp_frequency_list import JapaneseFrequencyList
from sys import argv
freq_list = JapaneseFrequencyList()
files = argv[1:]
@teddziuba
teddziuba / osx_extract_hash.py
Last active May 1, 2024 16:53
Extract a Mac OSX Catalina user's password hash as a hashcat-compatible string
#!/usr/bin/env python3
"""
Mac OSX Catalina User Password Hash Extractor
Extracts a user's password hash as a hashcat-compatible string.
Mac OSX Catalina (10.15) uses a salted SHA-512 PBKDF2 for storing user passwords
(hashcat type 7100), and it's saved in an annoying binary-plist-nested-inside-xml-plist
format, so previously reported methods for extracting the hash don't work.
@marko-jankovic
marko-jankovic / CSS and HTML interview questions.md
Last active May 1, 2024 16:52
CSS and HTML interview questions

CSS


What is CSS?

  • CSS stands for Cascading Style Sheet.
  • Styles define how to display HTML elements
  • Styles were added to HTML 4.0 to solve a problem
  • External Style Sheets can save a lot of work
  • External Style Sheets are stored in CSS files
@missinglink
missinglink / wrap.js
Last active May 1, 2024 16:50
wrap latitude and longitude values around the poles in order to normalize their ranges
/**
normalize co-ordinates that lie outside of the normal ranges.
longitude wrapping simply requires adding +- 360 to the value until it comes
in to range.
for the latitude values we need to flip the longitude whenever the latitude
crosses a pole.
**/
@josethz00
josethz00 / sr-frontend-interview-questions-answered.md
Last active May 1, 2024 16:46
Sr. Frontend Interview Questions

Senior Frontend Interview Questions

Some questions about frontend development that might be in your next job interview. The questions were formulated by @mauvieira, a super senior fullstack developer

General Frontend

  • What are the strategies we can use to optimize the performance of web applications?

    • CDNs, GraphQL (maybe) to reduce overfetching, improve backend performance, use SSR and/or SSG, lazy loading for loading assets only when it's needed, minimize and compress HTML, CSS and JS files, and optimize images by compressing and resizing them.
  • What are Web Vitals (LCP, FID, CLS)? And how are they applied in the real world?

@brianclements
brianclements / Config.in
Last active May 1, 2024 16:45
cURL package information for addition in buildroot. Copy both files to /package/curl and don't forget to add 'source "package/curl/Config.in"' to your top level Config.in
config BR2_PACKAGE_LIBCURL
bool "libcurl"
help
cURL is a tool for getting files from FTP, HTTP, Gopher, Telnet,
and Dict servers, using any of the supported protocols.
http://curl.haxx.nu/
config BR2_PACKAGE_CURL
bool "curl binary"
@pastleo
pastleo / howdy-face-recognition-arch-kde.md
Last active May 1, 2024 16:45
Setup face recognition authentication on ArchLinux and KDE Plasma using howdy

Setup face recognition authentication on ArchLinux and KDE Plasma using howdy

This is surprisingly easy...basically following Arch Wiki:

https://wiki.archlinux.org/index.php/Howdy

After some investigation, here is step by step and preferences

Install howdy

@jfeilbach
jfeilbach / sysctl.conf.md
Last active May 1, 2024 16:44
10/40 Gb NIC Linux Kernel Performance Tuning for samba file server

TCP tuning

The most important TCP tuning areas since kernel 4.9 are:

  • packet pacing
  • dynamic TSO sizing
  • TCP small queues
  • BBR TCP congestion algorithm

Definitions

  • Gb = gigabit
@aymericbeaumet
aymericbeaumet / delete-likes-from-twitter.md
Last active May 1, 2024 16:43
[Recipe] Delete all your likes/favorites from Twitter

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
 }