Skip to content

Instantly share code, notes, and snippets.

View yalin's full-sized avatar
✴️

Yalin Aydin yalin

✴️
  • Kingston, ON, Canada
  • X @yalin
View GitHub Profile
@hasansezertasan
hasansezertasan / main.py
Created May 12, 2024 01:12
How to use SQLAlchemy with numerical enums?
"""
How to use SQLAlchemy with numerical enums?
`IntEnum` class is taken from this article: [Using Python enums in SQLAlchemy models](https://michaelcho.me/article/using-python-enums-in-sqlalchemy-models/), all credits to the author.
"""
import datetime
import enum
from sqlalchemy import Integer, TypeDecorator, create_engine
@mijorus
mijorus / ThemedIcon.md
Last active December 15, 2022 07:54
List of Gio.ThemedIcon
@andrebrait
andrebrait / keychron_linux.md
Last active November 7, 2024 08:48
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

@Robert-96
Robert-96 / README.md
Last active May 4, 2024 06:05
Ember.Js: Installing Tailwind CSS

Ember.Js: Installing Tailwind CSS

TL;DR

$ ember install ember-cli-postcss                   # Install ember-cli-postcss
$ npm install --save-dev tailwindcss                # Install tailwindcss

$ npx tailwind init app/styles/tailwind.config.js   # Optional: Generate a Tailwind config file for your project  
$ npm install -save-dev postcss-import # Optional: If you want to use the @import statement
// Contributor: julio641742
/*
In this example we will be click a button in the top bar,
causing an event that create a text label (hello world), which with some
animation, will be decreasing its opacity from 100% to 0%
*/
/* Import St because is the library that allow you to create UI elements */
const St = imports.gi.St;
@igorjs
igorjs / rest-api-response-format.md
Last active November 11, 2024 05:14
REST API response format based on some of the best practices
@yoSteve
yoSteve / README.md
Last active May 24, 2023 19:53
VS Code User Settings for Pop!_OS UI Theme

VS Code Pop!_UI Color Theme

Have you seen Pop!_OS by System76? It's gorgeous.

Electrifying teals and scintillating tangerines pop against dark chocolate-grey windows and menus. Adding these customizations to 'User Settings' will allows you to enjoy the Pop!_OS UI color theme, and still be able to swap in your favourite syntax highlighting theme for improved readability and visual lexing.

Installation

  1. Open VS Code 'User Settings' File > Preferences > Settings.
  2. Copy the contents of vscode-color-settings.json into "workbench.colorCustomizations".
@parmentf
parmentf / GitCommitEmoji.md
Last active November 15, 2024 20:33
Git Commit message Emoji
@hunterbridges
hunterbridges / twitch_irc.md
Last active October 5, 2024 18:09
How to connect to Twitch with an IRC client (As of Oct 2015)

HOWTO

Connect to Twitch.tv chat with an IRC client

  1. Visit this website and get an OAuth Token for your Twitch account.
  2. Add a server to your IRC client with this configuration, using your OAuth Token as the server password. Make sure it is not using SSL.
{
  address = "irc.twitch.tv";
chatnet = "Twitch";