Skip to content

Instantly share code, notes, and snippets.

View rafaelkendrik's full-sized avatar

Rafael Kendrik rafaelkendrik

View GitHub Profile
import http from '@/http'
export const doLogin = (userInfo) => {
return http().get(`/sanctum/csrf-cookie`).then(() => {
return http().post(`/api/v1/common/login`, {
email: userInfo.email,
password: userInfo.password
}).then((response) => {
return response;
});
@bokwoon95
bokwoon95 / min-sane.sh
Last active May 21, 2020 10:43
minimal sane settings for .tmux.conf + .bashrc/.inputrc
echo "bind R source-file ~/.tmux.conf\\; display \"Reloaded!\"
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind e last-window
bind-key @ break-pane \\; last-window
bind-key S choose-window 'join-pane -v -s \"%%\"'
bind-key V choose-window 'join-pane -h -s \"%%\"'
set -sg escape-time 0
@Prezens
Prezens / gist:f99fd28124b5557eb16816229391afee
Created April 2, 2019 07:40
Apache .htaccess settings for Vue, vue-router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
https://router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations
@weaming
weaming / boostnote2md.py
Last active August 7, 2023 09:51
Convert boostnote cson format data to markdown
#!/usr/bin/env python3
# coding: utf-8
"""
Author : weaming
Created Time : 2018-05-26 21:32:59
Prerequisite:
python3 -m pip install cson arrow
"""
import json
import os
@kavalcante
kavalcante / estados.js
Last active July 13, 2023 05:09
Estados do Brasil em um Array - Javascript
states: [
{ 'AC': 'Acre' },
{ 'AL': 'Alagoas' },
{ 'AP': 'Amapá' },
{ 'AM': 'Amazonas' },
{ 'BA': 'Bahia' },
{ 'CE': 'Ceará' },
{ 'DF': 'Distrito Federal' },
{ 'ES': 'Espírito Santo' },
{ 'GO': 'Goías' },
@subfuzion
subfuzion / curl.md
Last active April 23, 2024 14:44
curl POST examples

Common Options

-#, --progress-bar Make curl display a simple progress bar instead of the more informational standard meter.

-b, --cookie <name=data> Supply cookie with request. If no =, then specifies the cookie file to use (see -c).

-c, --cookie-jar <file name> File to save response cookies to.

anonymous
anonymous / untitled
Created April 27, 2015 13:44
IFTTT Spotify Alarm Clock
Spotify Alarm
Utilizing [IFTT recipe](https://ifttt.com/recipes/283707-spotify-alarm-clock)
In your mail client:
Create a rule in your mail client with the following properties
- Message content contains #wakeup
- Actions: Delete Message, Run AppleScript
Create an AppleScript with the following statements.
@simonista
simonista / .vimrc
Last active April 18, 2024 06:11
A basic .vimrc file that will serve as a good template on which to build.
" Don't try to be vi compatible
set nocompatible
" Helps force plugins to load correctly when it is turned back on below
filetype off
" TODO: Load plugins here (pathogen or vundle)
" Turn on syntax highlighting
syntax on
@branneman
branneman / better-nodejs-require-paths.md
Last active April 8, 2024 00:22
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@digitalex
digitalex / removehtml
Last active January 13, 2023 08:50
Delete all HTML comments in VIM
%s/<!--\_.\{-}-->//g