Skip to content

Instantly share code, notes, and snippets.

View bluemix's full-sized avatar
🖐️
Hello There :D

Abdulmomen Bsruki bluemix

🖐️
Hello There :D
View GitHub Profile
@applch
applch / Game Porting Toolkit 1.0 Beta README
Last active September 29, 2023 17:22
Game Porting Toolkit 1.0 Beta 4 README
Game Porting Toolkit 1.0 Beta 4 README
Overview
The Game Porting Toolkit helps game developers create an environment for evaluating their existing Windows games right on Apple Silicon Macs running macOS 14. Using the included binaries and installation and configuration instructions, you can run your game to get a sense of how it can feel and play right away, even before you begin your porting journey.
Requirements
• The Game Porting Toolkit currently only runs on Apple Silicon Macs running macOS 14 Sonoma Beta.
• Translated games require more resources, so developer-focused Macs with 16GB of RAM or more are recommended.
@rBrenick
rBrenick / split_subtitle_file_into_multiline.py
Last active September 12, 2024 23:32
Take an .srt file and split the text line if the character count goes above a certain threshold.
import sys
import argparse
"""
Example usecase:
python split_srt_lines.py SUBTITLE_FILE_PATH.srt -o OUTPUT_FILE_PATH.srt --max_line_length=42 --comma_split_percent=75
if you don't specify an output path, it will replace the file content of the input file
@joepie91
joepie91 / mastodon-guide.md
Last active September 4, 2024 15:59
The 5-minute guide to the fediverse and Mastodon

The 5-minute guide to the fediverse and Mastodon

There are lots of guides explaining Mastodon and the broader fediverse, but they often go into way too much detail. So I've written this guide - it only talks about the basics you need to know to start using it, and you can then gradually learn the rest from other helpful fediverse users. Let's get started!

The fediverse is not Twitter!

The fediverse is very different from Twitter, and that is by design. It's made for building close communities, not for building a "global town square" or as a megaphone for celebrities. That means many things will work differently from what you're used to. Give it some time, and ask around on the fediverse if you're not sure why something works how it does! People are usually happy to explain, as long as it's a genuine question. Some of the details are explained in this article, but it's not required reading.

The most important takeaway is the "

@StylianosGakis
StylianosGakis / Bouncy ropes demo
Last active July 19, 2023 08:55
Jetpack Compose demo for an animated bouncy rope draggable with your mouse
import androidx.compose.animation.core.animateOffsetAsState
import androidx.compose.animation.core.spring
import androidx.compose.foundation.Canvas
import androidx.compose.foundation.gestures.detectDragGestures
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
@DevSrSouza
DevSrSouza / get-theme.main.kts
Created February 2, 2022 04:40
Kotlin Script that get Linux System Theme based on Dbus appearance color-schema from Gnome 42, KDE and Elementary
@file:DependsOn("com.github.hypfvieh:dbus-java-core:4.0.0")
@file:DependsOn("com.github.hypfvieh:dbus-java-transport-jnr-unixsocket:4.0.0")
@file:DependsOn("org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.0")
import org.freedesktop.dbus.annotations.DBusInterfaceName
import org.freedesktop.dbus.connections.impl.DBusConnection
import org.freedesktop.dbus.interfaces.DBusInterface
import org.freedesktop.dbus.types.Variant
val connection = DBusConnection.getConnection(DBusConnection.DBusBusType.SESSION)
@Xoshbin
Xoshbin / ku_intl.dart
Last active September 4, 2024 21:11
Flutter Kurdish MaterialLocalizations updated 10 Jan 2024
// ignore_for_file: override_on_non_overriding_member
import 'dart:async';
import 'package:intl/intl.dart' as intl;
import 'package:intl/date_symbols.dart' as intl;
import 'package:intl/date_symbol_data_custom.dart' as date_symbol_data_custom;
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
@danmana
danmana / example_model.py
Created August 16, 2021 15:08
Add support for custom json fields in Odoo
from odoo import models, fields, api
from json_field import JsonField
class Person(models.Model):
_name = 'example.person'
_description = 'Person with json details'
details = JsonField() # a json object represented as dict / list / python primitives
import androidx.compose.ui.Modifier
import androidx.compose.ui.composed
import androidx.compose.ui.draw.drawBehind
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.graphics.Paint
import androidx.compose.ui.graphics.drawscope.drawIntoCanvas
import androidx.compose.ui.graphics.toArgb
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
@VB10
VB10 / lazy_load.dart
Created April 9, 2021 20:44
Flutter Lazy Load Extension for ListView
extension ListViewExtension on ListView {
Widget onLazyLoads(Future<void> Function() onPagingLoad, {Widget? itemLoadWidget}) {
final delegate = childrenDelegate as SliverChildBuilderDelegate;
final itemCount = delegate.childCount ?? 0;
return NotificationListener<ScrollNotification>(
onNotification: (ScrollNotification notification) {
if (notification.metrics.pixels == notification.metrics.maxScrollExtent) {
onPagingLoad();
}
return true;
@johnathanmay
johnathanmay / logitech-mx-master-3-extras-for-linux-with-logiops.md
Last active November 26, 2024 06:08
How to install and configure PixlOne's logid to program Logitech MX Master 3 buttons on Linux.

Logitech MX Master 3 Extras for Linux With logiops

The Logitech Options program isn't available for Linux, but by a nice guy on GitHub (PixlOne) created an open source project that lets you obtain some of that functionality. It's called logiops. It works in conjunction with the Solaar project as well, which I find especially handy since that shows your available battery life in the system tray and lets you pair/unpair devices with the Logitech Unifying Receiver.

Here are some additional pages with info that I used to generate this documentation: