Skip to content

Instantly share code, notes, and snippets.

View naneri's full-sized avatar
👔

Kana naneri

👔
View GitHub Profile
@naneri
naneri / deploy.sh
Created September 18, 2017 08:08
deploy.sh
#!/bin/bash
currentFolder=${PWD##*/}
echo -e "$Cyan \n Updating System.. $Color_Off"
sudo apt-get update -y && sudo apt-get upgrade -y
echo -e "$Cyan \n Installing Apache2 $Color_Off"
sudo apt-get install apache2
@naneri
naneri / laravel.js
Created May 1, 2018 15:26
The delete button with my own csrf_token
/*
<a href="posts/2" data-method="delete"> <---- We want to send an HTTP DELETE request
- Or, request confirmation in the process -
<a href="posts/2" data-method="delete" data-token="{{ csrf_token() }}" data-confirm="Are you sure?">
*/
(function() {
@naneri
naneri / add_record_to_hosts.sh
Created September 2, 2018 17:15
Add a new line to hosts
echo 192.168.33.199 chef-automate.test | sudo tee -a /etc/hosts
@naneri
naneri / docker-compose.yml
Created January 5, 2020 14:08
docker-compose.yml
version: '2'
services:
# app with php container
app:
restart: unless-stopped
build:
context: ./
dockerfile: app.docker
volumes:
FROM php:7.4-fpm
# Install any needed packages
RUN apt-get update -yqq && \
apt-get install -yqq --no-install-recommends \
apt-utils \
openssl \
libzip-dev zip unzip \
git \
mariadb-client \
@naneri
naneri / cheats.sh
Last active December 4, 2022 23:10
My bash cheatsheet
# ==========
# Laravel
# ==========
# Laravel folder permissions
sudo chgrp -R www-data storage bootstrap/cache
sudo chmod -R ug+rwx storage bootstrap/cache
# ==========
# SSH