Skip to content

Instantly share code, notes, and snippets.

@domske
domske / safari-fix-overflow-border-radius.md
Last active April 27, 2024 08:38
Bugfix (Workaround) for Safari (iOS): Border radius with overflow hidden does not work as expected.

There is a bug in Safari when using border-radius and overflow: hidden. Especially when applying transform to a child. In this case, overflow: hidden does not always work. The child ignores the border radius and overflows. It's a very old bug. And sadly it seems that it will never be fixed. Anyway, we can't wait for it.

There are some workaround. We need to place the element with the overflow attribute into a stacking context. I've tested the following workarounds on the latest version of iOS (14.4). You can choose what you want. But you should search the web for the particular attribute. (e.g. will-change should be rarely used. See docs)

Use this on the element with overflow: hidden and border-radius:

@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 08:38
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@breithbarbot
breithbarbot / uninstall_zsh.sh
Last active April 27, 2024 08:34
Uninstall Zsh + Oh My Zsh + Powerlevel10k theme (macOS & Linux)
#!/bin/sh
# Install Zsh + Oh My Zsh + Powerlevel10k theme (macOS & Linux)
# run: sh -c "$(curl -fsSL "$(echo "$(curl -s "https://api.github.com/gists/254e58bd87009963b3f58405d75cbe6c")" | grep -o '"raw_url": *"[^"]*"' | cut -d'"' -f4)")"
# Remove installations + configurations
rm -f ~/.p10k.zsh
rm -rf -- ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
sh ~/.oh-my-zsh/tools/uninstall.sh -y
sudo chsh -s $(which bash)
@theabhayprajapati
theabhayprajapati / Companies.md
Last active April 27, 2024 08:31
List of 300+ Companies paying 12LPA+ base for SDE-1 role in India.

List of 300+ Companies paying 12LPA+ base for SDE-1 role in India.

source

Companies have been listed with their URLs so you can easily access their website. We would appreciate it if you could comment below with the correct URL if you find any that are broken.

  1. Acko
  2. Adobe
  3. Airbase
  4. Airbnb
  5. Airbus
@moogii
moogii / api.ts
Created August 8, 2021 16:50
Axios based Next js client and server side token refresher
import axios, { AxiosError } from "axios";
import { GetServerSidePropsContext } from "next";
import Router from "next/router";
const isServer = () => {
return typeof window === "undefined";
}
let accessToken = "";
let context = <GetServerSidePropsContext>{};
import 'package:bloc/bloc.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
void main() => runApp(BlocProvider<TestBloc>(
create: (c) => TestBloc(),
child: MyApp(),
));
class MyApp extends StatelessWidget {
@syneart
syneart / meld_hotfix_sonoma.sh
Last active April 27, 2024 08:24
Meld hotfix on MacOS with Sonoma(14) Intel / M1 & M2 & M3 (Apple silicon) CPU [with Rosetta]
### Test on https://github.com/yousseb/meld/releases/tag/osx-20
### OSX - 3.21.0 (r4) Sonoma
#!/bin/zsh
#Fix libpng16.16.dylib not found
install_name_tool -change /usr/local/opt/libpng/lib/libpng16.16.dylib @executable_path/../Frameworks/libpng16.16.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
#Fix libbrotlidec.1.dylib not found
install_name_tool -change /usr/local/opt/brotli/lib/libbrotlidec.1.dylib @executable_path/../Frameworks/libbrotlidec.1.dylib /Applications/Meld.app/Contents/Frameworks/libfreetype.6.20.0.dylib
@barkovv
barkovv / lab1.py
Last active April 27, 2024 08:24
Моделирование (одноканальная СМО без очереди с отказами, Python)
#!/usr/bin/env python3
# Поток простейший. Очередь отсутствует.
data = {"lambda": 0.95, "tsred": 1, "mu": 1, "m": 0 }
def setRo(data):
data["ro"] = data["lambda"] / data["mu"]
@mote0230
mote0230 / mail.php
Last active April 27, 2024 08:23 — forked from rantastic/mail.php
PHP: Send email using amazon SES with AWS Signature Version 4
<?php
//class docs: http://www.orderingdisorder.com/aws/ses/
require_once('ses.php');
//get credentials at http://aws.amazon.com My Account / Console > Security Credentials
$ses = new SimpleEmailService('ACCESSkeyID', 'SECRETaccessKEY', 'eu-west-1', 'email.eu-west-1.amazonaws.com');
//print_r($ses->listVerifiedEmailAddresses());