Skip to content

Instantly share code, notes, and snippets.

View erayerdin's full-sized avatar

Eray Erdin (&mut self) erayerdin

View GitHub Profile
@erayerdin
erayerdin / analysis_options.yaml
Created December 13, 2022 06:46 — forked from rydmike/analysis_options.yaml
RydMike lints v2.0.0 - Personal preferences and my starting point for my Dart & Flutter linter rules setup
# RydMike LINTER Preferences v2.0.0
#
# Get this file here: https://gist.github.com/rydmike/fdb53ddd933c37d20e6f3188a936cd4c
#
# We include and activate all lint rules, later below we disable the not used or desired ones.
# You can find a list of all lint rules to put in your all_lint_rules.yaml file here:
# https://dart-lang.github.io/linter/lints/options/options.html
#
# For a full comparison of all lint rules settings in rule styles listed below, please see this
# sheet: https://docs.google.com/spreadsheets/d/1Nc1gFjmCOMubWZD7f2E4fLhWN7LYaOE__tsA7bf2NjA
@erayerdin
erayerdin / main.dart
Last active April 21, 2022 23:03
Flutter Gradient Bottom Navigation Bar
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
debugShowCheckedModeBanner: false,
@erayerdin
erayerdin / snapcraft.yaml
Created March 4, 2021 22:34
rust unofficial snapcraft.yaml
name: ruffle-unofficial # you probably want to 'snapcraft register <name>'
base: core # the base snap is the execution environment for this snap
version: '20210304nightly' # just for humans, typically '1.2+git' or '1.3.2'
summary: "A Flash emulator"
description: |
Ruffle is an Adobe Flash Player emulator.
architectures:
- run-on: [amd64]
build-on: [amd64]
grade: devel
@erayerdin
erayerdin / Logger.cs
Last active April 11, 2020 12:29
Godot C# Logger Implementation Example
using System;
using static Godot.GD;
using Godot;
public enum LogLevel
{
TRACE,
DEBUG,
INFO,
WARNING,
@erayerdin
erayerdin / postgres-setup.md
Created March 5, 2020 00:01 — forked from jackvial/postgres-setup.md
Laravel Postgres Setup

Postgres Setup

Step 1: Install PostgreSQL

Here are the installation steps on Ubuntu (this installation will also work on any Debian-based distribution):

  1. Open a terminal window.
  2. Issue the command sudo apt-get install postgresql.
  3. Type the sudo password necessary to give you admin rights and hit Enter.
  4. Allow apt to pick up any necessary dependencies.
@erayerdin
erayerdin / rust.json
Last active January 17, 2020 14:44
Rust VSCode Snippets
{
// Place your snippets for rust here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",
@erayerdin
erayerdin / userscript.js
Created August 3, 2019 00:07
Just a better editor for Hashnode.
// ==UserScript==
// @name Hashnode Better Editor
// @namespace https://github.com/erayerdin
// @version 0.1
// @description Better editor for hashnode.
// @author Eray Erdin
// @include https://hashnode.com/draft/*
// @include https://hashnode.com/create/story
// @grant none
// ==/UserScript==
@erayerdin
erayerdin / model_base_classes.py
Created May 17, 2019 23:24
Abstract base model testing classes for pytest and Django
from django.db import models
import pytest
DATETIME_FIELDS = (models.DateTimeField, models.DateField, models.TimeField)
class BaseModelTest:
model: models.Model = None
@erayerdin
erayerdin / pre-commit
Created November 8, 2018 12:21
Pre-commit for Git especially for the stack which uses Python, Nose and Pycodestyle (formerly known as PEP8)
#!/bin/bash
export exit_code="0"
# if you want to start a dummy flask server
# export FLASK_APP="server.py"
# flask run --port 2333 --no-debugger --no-reload > /dev/null 2>&1 &
# I didn't find requests-mock practical, so written my own server instead
# what above does is it starts a server, puts it into background, redirects all output to /dev/null
@erayerdin
erayerdin / .aliases
Created October 28, 2018 09:53
Aliases that I use.
# managing with only "django" command
alias django="python manage.py"