Skip to content

Instantly share code, notes, and snippets.

View erayerdin's full-sized avatar

Eray Erdin (&mut self) erayerdin

View GitHub Profile
@mewset
mewset / playwright-arch-linux-fix.md
Created January 5, 2026 19:59
Playwright on Arch Linux - use system Chromium instead of bundled

Playwright on Arch Linux - just use system Chromium

So you're on Arch and Playwright is being a pain? Yeah, same. Here's what happens:

$ npm init playwright@latest
BEWARE: your OS is not officially supported by Playwright; installing dependencies for ubuntu24.04-x64 as a fallback.
Installing dependencies...
sh: line 1: apt-get: command not found
Failed to install browsers
@makiftutuncu
makiftutuncu / InterfaceAbstractClass.java
Last active December 21, 2019 22:10
A cliché example of interface vs. abstract class in Java
// Behavior of talking
interface Talks {
void talk(String what);
}
// Behavior of making sound
interface MakesSound {
void makeSound(String what);
}
@clbarnes
clbarnes / install.sh
Last active October 29, 2022 12:21
Git hook installation script
#!/bin/bash
# Adapted from https://gist.github.com/tilap/0590e78c9cfd8f6548f5
# Basic script to set custom project hook and share it with other developers
#
# cd [path-of-the-script]
# . install.sh
#
# Folders usecase
import requests
import requests_mock
def match_limited(request):
return '"Limit":10' in request.text
def match_limitless(request):
return '"Limit":10' not in request.text
limited_response = "limited"
@corerman
corerman / Manjaro_install_MariaDB.sh
Created May 14, 2018 09:41
Manjaro install MariaDB
pacman -S mariadb
mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql //注意这个datadir,很重要,按照默认操作
systemctl enable mysqld
systemctl start mysqld
mysql_secure_installation
@demidovakatya
demidovakatya / anime.md
Last active January 28, 2026 11:54
telegram stickers // anime
@IgnoredAmbience
IgnoredAmbience / 99-noto-mono-color-emoji.conf
Last active October 25, 2024 06:01
Noto Emoji Color fontconfig for Konsole
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!--
Noto Mono + Color Emoji Font Configuration.
Currently the only Terminal Emulator I'm aware that supports colour fonts is Konsole.
Usage:
0. Ensure that the Noto fonts are installed on your machine.
1. Install this file to ~/.config/fontconfig/conf.d/99-noto-mono-color-emoji.conf
@vaibhav-jain
vaibhav-jain / UniqueTogetherValidator.py
Created July 2, 2016 12:45
Django Rest Framework (DRF) Custom Unique Together Message
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class SomeSerializer(serializers.ModelSerializer):
"""
Demostrating How to Override DRF UniqueTogetherValidator Message
"""
class Meta:
{
"ab":{
"name":"Abkhaz",
"nativeName":"аҧсуа"
},
"aa":{
"name":"Afar",
"nativeName":"Afaraf"
},
"af":{
@ilopez
ilopez / gson-unirest.java
Created March 25, 2016 15:54
Using Gson with Unirest
Unirest.setObjectMapper(new ObjectMapper() {
private Gson gson = new Gson();
public <T> T readValue(String s, Class<T> aClass) {
try{
return gson.fromJson(s, aClass);
}catch(Exception e){
throw new RuntimeException(e);
}
}