Skip to content

Instantly share code, notes, and snippets.

@yasirkula
yasirkula / BetterWaitForSeconds.cs
Created October 13, 2019 15:54
WaitForSeconds manager that reuses instances to avoid GC in Unity
using System.Collections.Generic;
using UnityEngine;
public static class BetterWaitForSeconds
{
private class WaitForSeconds : CustomYieldInstruction
{
private float waitUntil;
public override bool keepWaiting
{
@rylev
rylev / main.rs
Created September 12, 2018 14:56
Bubble Sort In Rust
fn main() {
let mut sortable: [i32; 5] = [5, 8, 2, 7, 6];
let length = sortable.len();
let mut swapped = true;
print_array(&sortable);
while swapped {
swapped = false;
for i in 1..length {
@beatwiz
beatwiz / badbots.conf
Created January 25, 2017 22:15
List of Badbots
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
<ifModule mod_rewrite.c>
# mod rewrite redirects
RewriteEngine On
# LIST1 provided by hackers
@serong
serong / iller.json
Created April 4, 2015 15:59
JSON formatında Türkiye'nin illeri.
{
"1": "ADANA",
"2": "ADIYAMAN",
"3": "AFYONKARAHİSAR",
"4": "AĞRI",
"5": "AMASYA",
"6": "ANKARA",
"7": "ANTALYA",
"8": "ARTVİN",
"9": "AYDIN",