Skip to content

Instantly share code, notes, and snippets.

View mitsh's full-sized avatar
💭
Life is too short - Write Fast Code!

Mustafa Özgür mitsh

💭
Life is too short - Write Fast Code!
View GitHub Profile
@anarkila
anarkila / PerformanceMetrics.cs
Last active May 16, 2024 07:29
Expose Unity Profiler stats with Unity ProfilerRecorder API
// MIT License
// Copyright (c) 2022 anarkila - https://github.com/anarkila
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
@bison--
bison-- / FlyCamera.cs
Last active May 16, 2024 15:37 — forked from Mahelita/FlyCamera.cs
New Script FlyCamera add to any camera obj: instant unity editor style wasd right click debug cam, NEW UNITY INPUT SYSTEM
using UnityEngine;
using System.Collections;
using UnityEngine.InputSystem;
public class FlyCamera : MonoBehaviour
{
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
@bohwaz
bohwaz / php-8.1-strftime.php
Last active September 27, 2024 14:55
strftime() replacement function for PHP 8.1
<?php
namespace PHP81_BC;
/**
* Locale-formatted strftime using \IntlDateFormatter (PHP 8.1 compatible)
* This provides a cross-platform alternative to strftime() for when it will be removed from PHP.
* Note that output can be slightly different between libc sprintf and this function as it is using ICU.
*
* Usage:
* use function \PHP81_BC\strftime;
@mitsh
mitsh / docker.zsh
Created April 18, 2020 17:51
Docker completion for Zsh + prezto
curl -fLo ~/.zprezto/modules/completion/external/src/_docker https://raw.githubusercontent.com/docker/cli/master/contrib/completion/zsh/_docker
compinit
@phiberoptick
phiberoptick / pritunl-server-custom-ssl_manually
Last active July 18, 2024 18:39
Use custom SSL cert in Pritunl Server Community
Ignore all that craziness below. These can be set from the cli with the "pritunl" command.
The commands below can be used to get/set the values of the cert, key, port and if the :80 -> "app.server_port" redirect is active.
# Get current SSL server cert:
pritunl get app.server_cert
# Get current SSL server key:
pritunl get app.server_key
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active November 19, 2024 20:57
crack activate Office on mac with license file
"""
Copyright (c) 2017 Philip Maher / Scobalula
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@bradleybeddoes
bradleybeddoes / docker.zsh
Last active May 11, 2023 11:56
Docker completion for Zsh + prezto
$ docker run<tab>
-- no matches found --
$ curl -fLo ~/.zprezto/modules/completion/external/src/_docker https://raw.githubusercontent.com/docker/docker/master/contrib/completion/zsh/_docker
$ docker run<tab>
-- images --
0a89c74fff6c -- latest in bradleybeddoes/docker-whale
-- repositories --
bradleybeddoes/docker-whale
@prucha
prucha / UnityMeshCreator.cs
Last active March 31, 2024 15:45
Unity: Creating a Mesh in code
using UnityEngine;
using System.Collections;
// This Unity script demonstrates how to create a Mesh (in this case a Cube) purely through code.
// Simply, create a new Scene, add this script to the Main Camera, and run.
public class UnityMeshCreator : MonoBehaviour {
GameObject _cube;
@parf
parf / igbinary-vs-msgpack.php
Last active May 9, 2022 18:12
msgpack vs igbinary comparison on 1500x1500 array. msgpack is ~30 times slower
<?php
ini_set('memory_limit', '32G');
// PARFS speed test
echo "PHP Version: ".phpversion()." @ ".gethostname()."\n";
$sz = function ($f, $fu, $data, $iterations=10, $gz=1) {