Skip to content

Instantly share code, notes, and snippets.

View v0lkan's full-sized avatar
🎸
totally rocking it 🚀.

Volkan Özçelik v0lkan

🎸
totally rocking it 🚀.
View GitHub Profile
@v0lkan
v0lkan / silence.sh
Last active April 29, 2024 03:29
How to Have a Silent and High-Performing Western Digital MyCloud Mirror
#
# Needless to say, I (Volkan Ozcelik) take no responsibility, whatsoever,
# about what will happen to your NAS when you try these.
# When did it to mine, I observed *ENORMOUS* performance gain and a zen-like silence.
#
# +----------------------------------------------------------+
# | WHAT YOU ARE GOING TO DO CAN LIKELY VOID YOUR WARRANTY |
# | SO PROCEED WITH CAUTION |
# +----------------------------------------------------------+
#
@v0lkan
v0lkan / nginx.conf
Last active April 2, 2024 18:25
Configuring NGINX for Maximum Throughput Under High Concurrency
user web;
# One worker process per CPU core.
worker_processes 8;
# Also set
# /etc/security/limits.conf
# web soft nofile 65535
# web hard nofile 65535
# /etc/default/nginx
@v0lkan
v0lkan / JFDI.md
Created May 14, 2012 16:27
Jedis Feel Doin' It!
Nowadays, being really busy has become something worth bragging about or something you can't escape. 
You will probably even blame your commitments for stealing your time.

But is it truly impossible for you to make time for your "dream project"? 
Are you busy or is it avoidance?

Really. Look at your schedule; and put in a little "dream" time. 
Everything else would benefit more if you spend some time caring for your passions ;)

#JFDI™ (*):

@v0lkan
v0lkan / ozgurluk.md
Last active December 25, 2023 12:27
Ozgur Kaynak Projelerine Nasil Katkida Bulunabilirim

Ozgur Kaynak Projelerine Nasil Katkida Bulunabilirim

Ozgur kaynakli projelere destek olmak, bir yazilimcinin kendini gelistirmesi, kariyerinde ilerlemesi, ve daha da onemlisi baskalarina yardimci olabilmeleri ve topluluga katki saglamalari acisindan gercekten cok onemli.

Girecegin is mulakatlarinin hatri sayilir bir oraninda ozgur kaynakli kodlarin, yan projelerin, ve is disinda kendini gelistirmek icin neler yaptigin hakkinda konusuyor olacaksin – En azindan Silikon Vadisi'nde durum boyle.

Yeni teknolojiler ogrenmekten, daha once tanimadigin onlarca insanla iletisim kurmak; kendini ve yazdigin kodu tum dunyanin gozleri onune sermek biraz urkutucu olabilse de, sana cok sey katacaktir.

Bu dokumanda konuyla ilgili aklima gelenleri paylasiyorum. Eminim gozumden kacan seyler olacak. Eklemek istediklerini, gorus, dusunce, onerileri, ve yorumlarini ekle.

@v0lkan
v0lkan / invalidate.js
Created March 13, 2017 16:38
Invalidates ServiceWorkers so that you can fetch your assets freshly.
/**
* Invalidates the current `ServiceWorker` running on the page.
* Why? Because managing a cache is damn hard; and sometimes due to race conditions
* your assets might get out-of-sync.
*
* This mini snippet checks the version of the app against an uncached resource and
* invalidates the workers if it finds a mismatch.
*/
if ( navigator.serviceWorker && navigator.serviceWorker.getRegistrations ) {
@v0lkan
v0lkan / docker-i-t-trivia.md
Last active July 25, 2023 04:35
docker run -i -t
docker run -i -t --name nodejs ubuntu:latest /bin/bash

So here, -i stands for interactive mode and -t will allocate a pseudo terminal for us.

Some more trivia about these flags.

@v0lkan
v0lkan / _contrast_mixin.scss
Created September 27, 2011 11:00 — forked from aaronrussell/_contrast_mixin.scss
Sass function and mixin for setting contrasting background and foreground colors
$contrasted-default-dark: #000;
$contrasted-default-light: #fff;
@mixin contrasted($bg, $dark:$contrasted-default-dark, $light:$contrasted-default-light){
background-color: $bg;
color: get_contrast_yiq($bg, $dark, $light);
}
@v0lkan
v0lkan / zerotoherojs.com-outline.js
Last active January 18, 2023 18:49
“JavaScript: from Zero to Hero” Course Outline
/*
*
*/
(function closure() {
const courseOutline = [
{
title: 'Introduction',
lessons: [
{ title: 'About “JavaScript: from Zero to Hero”' },
@v0lkan
v0lkan / dsaqdcs.md
Last active January 14, 2023 23:22
Data Structures and Algorithms Quick And Dirty Cheat Sheet

Caveat

The tables in this cheatsheet only make sense after you study all thes mentioned data structures and algorithms below.

Do not memorize them, learn how the underlying algorithms work, read the source.

This cheat sheet is just a quick reference to give an broad brush strokes overview of how the most frequently-used data structures and algorithms relate to each other, in terms of time and space complexity.

@v0lkan
v0lkan / kubedump.sh
Created October 24, 2022 01:38
Dump everything in your Kubernetes cluster into folders a YAML files
#!/usr/bin/env bash
# Dumps everything in your Kubernetes cluster into folders a YAML files.
# Use it at your own risk.
set -e
CONTEXT=“$1”
if [[ -z ${CONTEXT} ]]; then