Skip to content

Instantly share code, notes, and snippets.

View ozanmuyes's full-sized avatar

Ozan Müyesseroğlu ozanmuyes

View GitHub Profile
@ozanmuyes
ozanmuyes / install-open.sh
Last active October 21, 2021 14:26
Mac OSX 'open' equivalent for Debian
#!/bin/bash
# echoes '#!/bin/bash xdg-open "$1" &> $HOME/.xdg-open-error &' to /usr/sbin/open
echo -e "\043\041/bin/bash\n\nxdg-open \042\044\061\042 &> $HOME/.xdg-open-error &" > ozanmuyes-open
sudo mv ozanmuyes-open /usr/sbin/open
sudo chmod +x /usr/sbin/open
echo -e "\n# Mac OSX \047open\047 equivalent for Debian\nalias 'open'='/usr/sbin/open'" >> $HOME/.bashrc
. $HOME/.bashrc
@ozanmuyes
ozanmuyes / Advices for Sustainable and Maintainable Codebase.md
Created May 18, 2022 00:39
Advices for Sustainable and Maintainable Codebase

Advices for Sustainable and Maintainable Codebase

  • [TDD] Write tests and / or docs before the implementation (even for pet and proof-of-concept projects)
This file has been truncated, but you can view the full file.
❯ cargo lipo
[INFO cargo_lipo::meta] Will build universal library for ["flutter_rust_bridge_example"]
[INFO cargo_lipo::lipo] Building "flutter_rust_bridge_example" for "aarch64-apple-ios"
Compiling cfg-if v1.0.0
Compiling scopeguard v1.1.0
Compiling lazy_static v1.4.0
Compiling encoding_index_tests v0.1.4
Compiling adler v1.0.2
Compiling adler32 v1.2.0
Compiling smallvec v1.7.0
@ozanmuyes
ozanmuyes / create-project.sh
Last active January 18, 2023 03:47
CakePHP via Docker
docker run -it --rm \
--name php74_composer \
-v "$PWD":/usr/src/myapp \
-w /usr/src/myapp \
php:7.4.33-cli sh -c "pwd; apt-get update && apt-get install -y unzip; \
curl https://raw.githubusercontent.com/composer/getcomposer.org/76a7060ccb93902cd7576b67264ad91c8a2700e2/web/installer | php; \
php composer.phar create-project --no-install --no-interaction --no-scripts --prefer-dist cakephp/app:\"3.6.5\" my_app_name; \
cd my_app_name; \
php ../composer.phar config --no-plugins allow-plugins.cakephp/plugin-installer true; \
php ../composer.phar install --ignore-platform-reqs; \
@ozanmuyes
ozanmuyes / main.rs
Created March 13, 2023 06:56
Rust Serde Test
use chrono::{serde::ts_seconds, DateTime, Utc};
use serde::{Deserialize, Serialize}; // 1.0.153 // 0.4.23
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(tag = "_type")]
pub enum Leave {
#[serde(rename = "administrative")]
Administrative {
id: u8,
user_id: u8,