Skip to content

Instantly share code, notes, and snippets.

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 {
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 27, 2024 08:24
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
@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());

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@sandeepsuvit
sandeepsuvit / .env
Last active April 27, 2024 08:22
nestjs file upload using multer
##
# File properties
##
UPLOAD_LOCATION=/Users/dummyusername/Documents/temp/nvaluate
# Max 5Mb allowed
MAX_FILE_SIZE=5
MAX_FILE_COUNTS=20
@henfiber
henfiber / KB-Buying-guide-EU.md
Last active April 27, 2024 08:20
Buying keyboards and keyboard components from EU

Europe

  • SkinFlint : Price comparison site which has some nice filtering options per switch type etc. Searches for offers in UK, Germany, Poland and Austria
  • mykeyboard.eu : Keyboards, keycaps and accessories. Based in Belgium.
  • candykeys.com : European Store selling Vortex, Leopold, KBP, Anne Pro keyboards, keycap sets and components (ISO + ANSI). Based in Germany, ships to EU.
  • falba.tech : custom wooden bamboo cases, and some acrylic and carbon ones. Switch packs (65 browns at 48EUR). Other parts for the GH60, Atreus, ErgoDox. Also Microcontrollers, diodes, leds etc.
  • 42keebs.eu - Mostly PCBs, tools and accessories. Located in Czech Republic.
  • KEYGEM : Switches, Keycaps, lubes, cables, DIY kits and deskmats. Based in Germany, ships to the EU and worldwide.
  • [Eloquent Clicks - Custom Mechanical Keyboard Store](https://www.eloquen