This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
filetype plugin indent on | |
set encoding=UTF-8 | |
set number | |
set cmdheight=1 | |
set ruler | |
set incsearch | |
set cursorline | |
set ignorecase |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -g default-terminal "screen-256color" | |
source "/usr/share/powerline/bindings/tmux/powerline.conf" | |
set -g history-limit 10000 | |
unbind C-b | |
set -g prefix C-a | |
set -g mouse on | |
unbind r | |
bind r source-file ~/.tmux.conf \; display "Reloaded ~/.tmux.conf" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
filetype plugin indent on | |
set encoding=UTF-8 | |
set relativenumber | |
set number | |
set cmdheight=1 | |
set ruler | |
set incsearch | |
set cursorline |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { saveRefreshToken } from 'containers/App/actions'; | |
const config = require(`config/config`).default; | |
const axios = require('axios'); | |
let isAlreadyFetchingAccessToken = false; | |
let subscribers = []; | |
export default function setupAxiosRefreshTokenInterceptor(axiosInstance, store) { | |
let accessToken = store.getState().global.userData.access_token; | |
let refreshToken = store.getState().global.userData.refresh_token; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import sys | |
euid = os.geteuid() | |
if euid != 0: | |
print("You need to be the Superuser to make changes to these files!") | |
args = ['sudo', sys.executable] + sys.argv + [os.environ] | |
os.execlpe('sudo', *args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Models\Traits; | |
use DB; | |
/** | |
* This trait is to work around a problem where a limit on an Eloquent | |
* relation by default applies to all queried models in total. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$needleWords = 'work,hard,learn'; | |
$text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris ,work, nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in hard, culpa qui officia deserunt mollit anim id est laborum.'; | |
$scanner = new WordsScanner($needleWords,$text); | |
$scanner->scanText(); | |
class WordsScanner { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use PHPMailer\PHPMailer\PHPMailer; | |
use PHPMailer\PHPMailer\Exception; | |
class MailController { | |
private $mailer; | |
public function __construct($body,$subject) | |
{ | |
$this->mailer = new PHPMailer(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Controllers; | |
use App\AdminActivityLog; | |
use App\Exceptions\ValidationException; | |
use App\GooglePayment; | |
use App\GooglePaymentRenew; | |
use Illuminate\Http\Request; | |
use Illuminate\Support\Facades\Config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Jobs; | |
use App\File; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Queue\InteractsWithQueue; | |
use Illuminate\Contracts\Queue\ShouldQueue; | |
use GuzzleHttp\Client; |