Skip to content

Instantly share code, notes, and snippets.

View korayguclu's full-sized avatar

Koray Güclü korayguclu

View GitHub Profile
@korayguclu
korayguclu / Http.js
Created May 11, 2018 16:39 — forked from dbshoupe/Http.js
Wrapper class for Axios in a Vue project that uses interceptor to inject token (stored using Vuex) into header for each request.
import axios from 'axios';
import store from "@/data/state"
class Http {
constructor() {
let service = axios.create({});
service.interceptors.request.use((config) => {
config.headers.common['x-access-token'] = store.state.token
return config
@korayguclu
korayguclu / ultimate-ut-cheat-sheet.md
Created April 11, 2018 12:20 — forked from yoavniran/ultimate-ut-cheat-sheet.md
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai and Sinon

The Ultimate Unit Testing Cheat-sheet

For Mocha, Chai and Sinon

using mocha/chai/sinon for node.js unit-tests? check out my utility: mocha-stirrer to easily reuse test components and mock require dependencies


@korayguclu
korayguclu / tmux.md
Created April 5, 2018 08:33 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@korayguclu
korayguclu / axios-vs-superagent.js
Created February 7, 2018 11:59 — forked from natesilva/axios-vs-superagent.js
Compare performance of Axios vs. SuperAgent when running under Node.js
const Benchmark = require('benchmark');
const axios = require('axios');
const superagent = require('superagent');
var suite = new Benchmark.Suite;
const targetUrl = 'http://httpbin.org/ip';
suite
.add('axios', {
@korayguclu
korayguclu / docker-cheat-sheat.md
Created January 31, 2018 21:18 — forked from dwilkie/docker-cheat-sheat.md
Docker Cheat Sheet

Build docker image

$ cd /path/to/Dockerfile
$ sudo docker build .

View running processes

@korayguclu
korayguclu / gear.md
Created October 30, 2016 21:47 — forked from joelhooks/gear.md
Podcasting Gear List
@korayguclu
korayguclu / gist:7ba24ae87ddd1063ac20
Last active February 6, 2016 11:32 — forked from dustinsmith1024/gist:1686977
Installing Janus VIM on fresh Ubuntu
sudo apt-get install git -y
sudo apt-get install rake -y
curl -Lo- http://bit.ly/janus-bootstrap | bash
# finally worked then wanted to edit and enable a darker theme
cd ~
echo 'color molokai' >> ~/.vimrc.after

CSS Price Table

Flat pricing table.

@korayguclu
korayguclu / multiple-3rd-party-widgets.js
Created November 17, 2015 11:28 — forked from zenorocha/multiple-3rd-party-widgets.js
Loading multiple 3rd party widgets asynchronously
(function() {
var script,
scripts = document.getElementsByTagName('script')[0];
function load(url) {
script = document.createElement('script');
script.async = true;
script.src = url;
scripts.parentNode.insertBefore(script, scripts);
@korayguclu
korayguclu / egghead_YouTube_downloader.py
Created September 29, 2015 15:10 — forked from SamuelMarks/egghead_YouTube_downloader.py
Simple algorithm to download all the egghead.io videos in highest-quality from YouTube.
"""
Simple algorithm to download all the egghead.io videos in highest-quality from YouTube.
Run from the directory you want the videos to appear. Renames them so that they have the video number + omit the repetitive "Egghead.io - AngularJS -" text.
Installing dependency:
$ pip install git+https://github.com/NFicano/pytube#egg=pytube
"""
from pytube import YouTube #, exceptions as YTD_exceptions