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 / console.extend.wtf.js
Last active August 29, 2015 14:07 — forked from anonymous/console.extend.wtf.js
A shim for the console.wtf functionality (hoping that somebody natively implements that feature in the future ;))
// ## Every console needs a WTF prompt.
//
// Usage:
//console.wtf('This should not have happened AT ALL!', param1, param2);
// Check if `console.wtf` is natively supported.
if (!console.wtf) {
console.wtf = function() {
console.warn.apply(console,
@v0lkan
v0lkan / nginx.conf
Last active August 19, 2025 18:31
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 / ssha.sh
Last active September 3, 2022 00:22
salted sha
#!/usr/bin/env bash
# Warning: SHA1 is considered cryptographically broken.
# Do not use it for very sensitive stuff.
# It’s “good enough” for not-so-sensitive stuff.
die () {
echo >&2 "$@"
echo "Usage: ssha.sh username password"
exit 1
@v0lkan
v0lkan / vimrc
Last active September 15, 2015 15:15
vimrc
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
"
" Darcula colorscheme for VIM.
"
set background=dark
highlight clear
if exists("syntax_on")
syntax reset
endif
@v0lkan
v0lkan / choo-choo.txt
Created November 24, 2015 15:51
All Aboard!
MOZCELIK-M-21NU:~ volkan$ sh ping.sh
Mon Nov 23 17:14:03 2015 PING google.com (198.70.246.110): 56 data bytes
Mon Nov 23 17:14:03 2015 64 bytes from 198.70.246.110: icmp_seq=0 ttl=54 time=80.493 ms
Mon Nov 23 17:14:08 2015 64 bytes from 198.70.246.110: icmp_seq=1 ttl=54 time=69.436 ms
Mon Nov 23 17:14:13 2015 64 bytes from 198.70.246.110: icmp_seq=2 ttl=54 time=121.397 ms
Mon Nov 23 17:14:18 2015 64 bytes from 198.70.246.110: icmp_seq=3 ttl=54 time=276.106 ms
Mon Nov 23 17:14:23 2015 64 bytes from 198.70.246.110: icmp_seq=4 ttl=54 time=167.700 ms
Mon Nov 23 17:14:28 2015 64 bytes from 198.70.246.110: icmp_seq=5 ttl=54 time=75.042 ms
Mon Nov 23 17:14:33 2015 64 bytes from 198.70.246.110: icmp_seq=6 ttl=54 time=81.456 ms
Mon Nov 23 17:14:38 2015 64 bytes from 198.70.246.110: icmp_seq=7 ttl=54 time=329.083 ms
@v0lkan
v0lkan / schema.js
Created December 1, 2015 15:54
FluentConf Node.JS API Performance Talk (draft for a demo schema)
'use strict';
import {
GraphQLObjectType,
GraphQLSchema,
GraphQLList,
GraphQLString
} from 'graphql/type';
import { Promise } from 'bluebird';
@v0lkan
v0lkan / gist:ad1335ae86ba99d65c4f
Created December 16, 2015 20:23
Add this to your ~/.basrc to start "Docker Quickstart Terminal" from the terminal with less keystrokes and less distractions.
alias dock='/usr/bin/env bash '\''/Applications/Docker/Docker Quickstart Terminal.app/Contents/Resources/Scripts/start.sh'\'''
@v0lkan
v0lkan / add.sh
Last active April 11, 2018 19:45
Maintains a textile of sorted unique lines.
#!/usr/bin/env bash
# MIT Licensed
# Maintainer: Volkan Özçelik <[email protected]>
# A quick and dirty way to keep a sorted text file of things.
#
# Usage:
#
# ./add 'lorem ipsum' 'dolor' 'dolor' 'dolor' 'ipsum dolamet' 'john doe'
@v0lkan
v0lkan / reverse.js
Created March 24, 2016 17:00
reverses a string in an inefficient way.
function r(s) {
if (s === "") return "";
return r(s.substr(1)) + s.charAt(0)
}