Skip to content

Instantly share code, notes, and snippets.

@joelstransky
joelstransky / custom-file-size-units.js
Last active March 28, 2024 15:45
Custom Intl.NumberFormat units
sizeFormatter = new Intl.NumberFormat([], {
style: "unit",
unit: "byte",
notation: "compact",
unitDisplay: "narrow",
});
(_bytes) => {
const units = { B: " bytes", KB: " kb", MB: " mb", GB: " gb", TB: " tb" };
const parts = sizeFormatter.formatToParts(_bytes);
@rap2hpoutre
rap2hpoutre / laravel-forge-deploy.sh
Last active March 28, 2024 15:45
Laravel Forge deploy script without downtime
# stop script on error signal
set -e
# remove old deployment folders
if [ -d "/home/forge/deploy" ]; then
rm -R /home/forge/deploy
fi
if [ -d "/home/forge/backup" ]; then
rm -R /home/forge/backup
fi
@cassidoo
cassidoo / base-css.md
Created May 4, 2022 06:37
Base CSS for a plain HTML document

If you don't want to deal with styling a mostly text-based HTML document, plop these lines in and it'll look good:

html {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  font-size: 1.3em;
  max-width: 40rem;
  padding: 2rem;
  margin: auto;
 line-height: 1.5rem;
@tanaikech
tanaikech / submit.md
Created December 3, 2020 07:08
Sample Scripts for Creating New Event with Google Meet Link to Google Calendar using Various Languages

Sample Scripts for Creating New Event with Google Meet Link to Google Calendar using Various Languages

This is the sample scripts for creating new event with Google Meet link to Google Calendar using various languages. When I saw the official document of "Add video and phone conferences to events", in the current stage, I can see only the sample script for Javascript. But I saw the several questions related to this for various languages. So I published the sample scripts for creating new event with Google Meet link to Google Calendar using various languages.

In order to create new event with Google Meet link to Google Calendar, it is required to set the request body and query parameter as follows.

Please add the following object to the request body.

conferenceData: {
@letsgoawaydev
letsgoawaydev / WinKeys.txt
Last active March 28, 2024 15:42
Windows Product Keys
``````````````````````````````````````````
Windows Product Keys for Getting Past Setup
Windows XP - Windows 11
Home product keys are currently not added.
THESE WILL ONLY HELP YOU GET PAST SETUP AND WILL NOT
ACTIVATE WHEN YOU CONNECT TO THE INTERNET. THESE JUST
LET YOU INSTALL WINDOWS TO YOUR HARDDISK UNACTIVATED
``````````````````````````````````````````
@navsing
navsing / MessagesPart-III.swift
Last active March 28, 2024 15:41
Recreating the Messages App Part III (Chat Bubble Shape) using SwiftUI and Swift Playgrounds on iPad
import SwiftUI
import PlaygroundSupport
struct Screen: View {
var body: some View {
VStack {
HStack {
Spacer()
Text("Here’s to the crazy ones, the misfits, the rebels, the troublemakers, the round pegs in the square holes… the ones who see things differently — they’re not fond of rules…").padding().background(Color(UIColor.systemBlue)).clipShape(BubbleShape(myMessage: true)).foregroundColor(.white)
@michenriksen
michenriksen / README.md
Created November 4, 2023 15:35
💅 Get italic text and curly underlines in macOS + Alacritty + tmux + Neovim

Italic text and other styles in Alacritty, tmux, and Neovim on macOS

This is a quick guide to get properly set up with italic text, curly underlines and other advanced styles in Alacritty, tmux, and Neovim on macOS. It assumes you're using the latest versions of all three programs.



@jamm1985
jamm1985 / lab_17_intro_to_ml_time_series_part_i.ipynb
Created May 4, 2022 12:57
Lab_17_intro_to_ML_time_series_part_I.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jamm1985
jamm1985 / lab_20_intro_to_ml_time_series_part_iv.ipynb
Created June 2, 2022 16:21
Lab_20_intro_to_ML_time_series_part_IV.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@Sauerstoffdioxid
Sauerstoffdioxid / googleurlparams.md
Last active March 28, 2024 15:37
Google/Blogger Image URL Parameters

Google/Blogger Image URL Parameters

This is an effort to document what is known about Google's (Blogger's/Blogspot's) image URL parameters. Some of these options were taken from existing first or third party documentation (see the links at the end of this document), but the majority is based off my own investigations.

Where to use them?

  • On Blogger's image URL's: 2.bp.blogspot.com/-OF7u67HQE1M/VHc8S8qJTDI/AAAAAAAACxI/UD-11c63diQ/s1600/005.png
  • On just about any googleusercontent image URL: https://lh3.googleusercontent.com/Jvmz11cLrvNIHG_LWjVO9B-UV2IN4Cfk1pycbhWZl6IriMgCAGCOFuBRtoHaiZ6xeVGqCugZcCql=w176-h176-n-o

Replace the bolded parts with the parameters.