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 / delete-hidden-files.php
Created October 22, 2020 06:14
Ftp related important files.
<?php
/**
* Find and delete all hidden files in $dir
* Usage: remove-hidden-files.php OR remove-hidden-files.php /path/to/parse/
*
* Without path parameter, the current path is being used.
*
* (C)ommitted 2015 by @author Fabian Wolf (@link http://usability-idealist.de/)
*
* @license GNU GPL v3
{
"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,
# 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
---
deployment:
tasks:
- export DEPLOYPATH=/home/{username}/{git_repo_dir}/
- /bin/cp -r * $DEPLOYPATH
# ~/.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
@Robiussani152
Robiussani152 / VueDataTablePaginationController.php
Last active January 23, 2022 16:15
Vuejs & yajra datatable as API
public function testPaginateApi(ProductDataTable $dataTables)
{
return $dataTables->ajax();
}
@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[@]}"
<?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 / 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
name: push-to-do-server
on:
push:
branches: [ main ]
jobs:
automatic-deploy:
runs-on: ubuntu-latest
steps: