Skip to content

Instantly share code, notes, and snippets.

View einnar82's full-sized avatar
🎯
Doing nice things.

Rannie Ollit einnar82

🎯
Doing nice things.
View GitHub Profile
@akatche
akatche / createdb.sql
Last active October 7, 2022 13:08
Run Laravel parallel tests using Laravel Sail
#
# Create this file in the following folder docker/mysql/docker-entrypoint-initdb.d
#
CREATE DATABASE IF NOT EXISTS `test_1` COLLATE 'utf8_general_ci' ;
GRANT ALL ON `test_1`.* TO 'root'@'%' ;
CREATE DATABASE IF NOT EXISTS `test_2` COLLATE 'utf8_general_ci' ;
GRANT ALL ON `test_2`.* TO 'root'@'%' ;
@eSkiSo
eSkiSo / install_oci8_ubuntu20_php7.4.md
Last active August 26, 2024 07:52
Install OCI8 (Oracle) in Ubuntu 20 with PHP 7.4
const axios = require('axios').default;
axios.interceptors.request.use(x => {
const headers = {
...x.headers.common,
...x.headers[x.method],
...x.headers
};
@johndavedecano
johndavedecano / .gitlab-ci.yml
Last active April 26, 2024 09:32
CI/CD for ReactJS Application using GITLAB
cache:
paths:
- node_modules/
- .yarn
stages:
- build
- test
- deploy
build:
image: node:10
/*
CodeSignal Add Two Digits Problem:
You are given a two-digit integer n. Return the sum of its digits.
Example
For n = 29, the output should be
addTwoDigits(n) = 11.
@bradtraversy
bradtraversy / django_crash_course.MD
Last active October 6, 2024 23:15
Commands for Django 2.x Crash Course

Django Crash Course Commands

# Install pipenv
pip install pipenv
# Create Venv
pipenv shell
import { PersistGate } from 'redux-persist/integration/react'
import { configureStore, checkVersions } from '@store/store'
...
const { store, persistor } = configureStore()
export default class App extends Component {
...
render() {
const { hideSplash } = this.props
return (
<?php
class Pipeline
{
public static function make_pipeline()
{
$funcs = func_get_args();
return function($arg) use ($funcs)
{
foreach($funcs as $function) {
if(!isset($value))
@johndavedecano
johndavedecano / default.conf
Last active January 2, 2019 07:18
PHP 7.2 Laravel Nginx Basic Configuration
server {
listen 80 default_server;
listen [::]:80 default_server;
root /home/ubuntu/project/public;
index index.php index.html;
server_name _;
@bradtraversy
bradtraversy / pipenv_cheat_sheet.md
Last active October 1, 2024 23:45
Pipenv cheat sheet for common commands

Pipenv Cheat Sheet

Install pipenv

pip3 install pipenv

Activate

pipenv shell