Skip to content

Instantly share code, notes, and snippets.

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

Sagar sagar290

🏠
Working from home
View GitHub Profile
@sagar290
sagar290 / lamp.sh
Created November 15, 2019 16:08 — forked from aamnah/lamp.sh
Bash script to install Apache, MySQL and PHP as well as PHPMyAdmin and some tweaks. For Debian and Ubuntu. To run, copy the script to the server and run ``bash lamp.sh``
#!/bin/sh
#######################################
# Bash script to install an AMP stack and PHPMyAdmin plus tweaks. For Debian based systems.
# Written by @AamnahAkram from http://aamnah.com
# In case of any errors (e.g. MySQL) just re-run the script. Nothing will be re-installed except for the packages with errors.
#######################################
#COLORS
@sagar290
sagar290 / gist:cea96ac16bad5a6dfd4572ed42625daa
Created December 7, 2019 22:00 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@sagar290
sagar290 / The_css_cursor_Property.css
Last active December 18, 2019 07:10
The css cursor Property
<style>
.alias {cursor: alias;}
.all-scroll {cursor: all-scroll;}
.auto {cursor: auto;}
.cell {cursor: cell;}
.context-menu {cursor: context-menu;}
.col-resize {cursor: col-resize;}
.copy {cursor: copy;}
.crosshair {cursor: crosshair;}
@sagar290
sagar290 / deployment_guide.md
Created January 2, 2020 16:59 — forked from vicgonvt/deployment_guide.md
Deployment Guide for Ubuntu Server from Scratch with Laravel
@sagar290
sagar290 / Array.c
Last active January 3, 2020 08:11
Assignment
#include<stdio.h>
#include<stdlib.h>
void traversingArray(int a[], int UB);
void insertArray(int a[], int n, int k, int item);
void deleteArray(int a[], int n, int k, int item);
int main() {
int a[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
@sagar290
sagar290 / Stack.c
Created January 3, 2020 09:27
Assignment
#include<stdio.h>
#include<stdlib.h>
void traversingArray(int a[], int UB);
void push(int stack[], int top, int maxstk, int item);
void pop(int stack[], int top, int item);
int main() {
@sagar290
sagar290 / Queue.c
Created January 3, 2020 09:28
Assignment
#include<stdio.h>
#include<stdlib.h>
void traversingArray(int a[], int UB);
void qInsert(int queue[], int n, int front, int rear, int item);
void qDelete(int queue[], int n, int front, int rear, int item);
int main() {
@sagar290
sagar290 / run-command.php
Created January 24, 2020 17:36 — forked from codeZoner/run-command.php
Execute Shell Script using PHP (Git Pull Example)
<?php
// chdir to the correct directory before calling the script
//Ref: https://stackoverflow.com/questions/11052162/run-bash-command-from-php#answer-11052453
$old_path = getcwd();
chdir('/path/to/file');
//make sure to make the shell file executeable first before running the shell_exec function
$output = shell_exec('./shell-script.sh');
chdir($old_path);
echo $output;
@sagar290
sagar290 / Vagrantfile
Created February 1, 2020 06:57
Vagrant 3 server configuration
config.vm.box = "ubuntu/xenial64"
config.vm.define "admin01" do | admin01 |
admin01.vm.hostname = "admin01"
admin01.vm.network "private_network", ip: "10.9.8.10"
end
config.vm.define "server01" do | server01 |
server01.vm.hostname = "server01"
server01.vm.network "private_network", ip: "10.9.8.11"
@sagar290
sagar290 / Vagrantfile.sh
Created February 1, 2020 09:46
enable ssh PasswordAuthentication
#Log in as root
#Edit ssh config:
sudo nano /etc/ssh/sshd_config
#Change this line:
PasswordAuthentication no
#to
PasswordAuthentication yes
#Restart daemon:
sudo systemctl restart sshd