Skip to content

Instantly share code, notes, and snippets.

View singleseeker's full-sized avatar

SingleSeeker singleseeker

View GitHub Profile
@Godofbrowser
Godofbrowser / axios.refresh_token.1.js
Last active April 26, 2024 12:57 — forked from culttm/axios.refresh_token.js
Axios interceptor for refresh token when you have multiple parallel requests. Demo implementation: https://github.com/Godofbrowser/axios-refresh-multiple-request
// for multiple requests
let isRefreshing = false;
let failedQueue = [];
const processQueue = (error, token = null) => {
failedQueue.forEach(prom => {
if (error) {
prom.reject(error);
} else {
prom.resolve(token);
@avataru
avataru / EloquentCheatSheet.md
Last active May 6, 2024 01:22
Eloquent relationships cheat sheet
@ivankristianto
ivankristianto / php5apache-with-memcache.txt
Created June 19, 2016 15:14
Install memcached php7 on docker
FROM php:7.0-fpm
# ...
RUN apt-get update && apt-get install -y \
libpq-dev \
libmemcached-dev \
curl
# ...
@beanmoss
beanmoss / RestControllerTrait.php
Created April 18, 2015 12:12
Playing with Laravel Lumen: simple RESTful trait.
<?php namespace App\Http\Controllers;
use Illuminate\Http\Request;
trait RestControllerTrait
{
public function index()
{
$m = self::MODEL;
return $this->listResponse($m::all());
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active May 3, 2024 12:32
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@shiftkey
shiftkey / .gitconfig
Created September 16, 2012 11:14
Sample .gitconfig with aliases for fun and profit
[alias]
st = status
co = checkout
ci = commit
br = branch
df = diff
lp = log -p
com = checkout master
fe = fetch origin
hr = reset origin/master --hard
@mikedfunk
mikedfunk / README.md
Created August 28, 2012 21:17
CodeIgniter Pagination for Twitter Bootstrap

This uses Twitter Bootstrap classes for CodeIgniter pagination.

Drop this file into application/config.

@andyferra
andyferra / github.css
Created April 30, 2012 02:11
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@pksunkara
pksunkara / config
Last active April 28, 2024 18:59
Sample of git config file (Example .gitconfig) (Place them in $XDG_CONFIG_HOME/git)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[init]
defaultBranch = master
[core]
editor = nvim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
pager = delta