Skip to content

Instantly share code, notes, and snippets.

View Robiussani152's full-sized avatar
🏠
Working from home

Robius Sani Robiussani152

🏠
Working from home
View GitHub Profile
@Robiussani152
Robiussani152 / .gitlab-ci.yml
Last active February 7, 2024 08:18
Gitlab CI/CD pipeline yml file
---
image: alpine:latest
stages:
- deploy
stage-deploy:
stage: deploy
environment:
name: staging
name: push-to-do-server
on:
push:
branches: [ main ]
jobs:
automatic-deploy:
runs-on: ubuntu-latest
steps:
@Robiussani152
Robiussani152 / instruction.md
Created March 9, 2022 05:09
VsCode extentions & settings
  1. Open git bash and run the commands to install extentions
  2. Open settings.json and paste this file
  3. Download Operator Mono Lig Or Fira Code for font
<?php
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Session;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
@Robiussani152
Robiussani152 / db-backup.sh
Created December 29, 2021 11:12
bash file for db backup and if the backup file is older than 1 day it will automatically delete those files.
#!/bin/bash
#your database info
DBHOST='localhost'
DBUSER='db_user'
DBPW='db_password'
DBNAME=('db_name')
#get recent version of databases from array
for i in "${DBNAME[@]}"
@Robiussani152
Robiussani152 / VueDataTablePaginationController.php
Last active January 23, 2022 16:15
Vuejs & yajra datatable as API
public function testPaginateApi(ProductDataTable $dataTables)
{
return $dataTables->ajax();
}
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# ... or force ignoredups and ignorespace
HISTCONTROL=ignoredups:ignorespace
---
deployment:
tasks:
- export DEPLOYPATH=/home/{username}/{git_repo_dir}/
- /bin/cp -r * $DEPLOYPATH
# Alias for pythons
alias py=python
# Alias for composer
alias cr=composer
alias cri="composer install"
alias crd="composer dump-autoload"
alias cru="composer update"
# Alias for artisan commands
{
"editor.suggestSelection": "first",
"editor.fontFamily": "'Operator Mono Lig', 'Hack Nerd Font Mono'",
"editor.fontWeight": "400",
"editor.formatOnPaste": true,
"material-icon-theme.folders.color": "#8C59D0",
"editor.fontSize": 16,
"workbench.startupEditor": "none",
"workbench.editor.enablePreview": false,
"editor.formatOnType": true,