Skip to content

Instantly share code, notes, and snippets.

View Faizanq's full-sized avatar

Faizan Qureshi Faizanq

View GitHub Profile
@Faizanq
Faizanq / gist:7e7a5d7ca320a3d6cfaad51f221b392c
Created September 27, 2019 03:18
Alter and Add new fields in Laravel Migration
php artisan make:migration alter_braintree_to_subscriptions --table=subscriptions
php artisan make:migration add_stripe_id_to_users --table=users
https://myaccount.google.com/lesssecureapps
https://accounts.google.com/b/0/DisplayUnlockCaptcha
module.exports.generatePdf = async ()=>{
async function Html() {
try {
const data = {
name: 'Faizan'
}
lsof -Pi | grep LISTEN
@Faizanq
Faizanq / bash-script-git.sh
Created July 11, 2019 09:20 — forked from salcode/bash-script-git.sh
Notes for bash scripting git commands
# Current branch - Determine current git branch, store in $currentbranch, and exit if not on a branch
if ! currentbranch=$(git symbolic-ref --short -q HEAD)
then
echo We are not currently on a branch.
exit 1
fi
# Uncommited Changes - Exit script if there uncommited changes
if ! git diff-index --quiet HEAD --; then
echo "There are uncommited changes on this repository."
tar -xvzf LibreOffice_6.2.5_Linux_x86_deb.tar.gz
cd LibreOffice_6.2.5_Linux_x86_deb/DEBS/
dpkg -i *.deb
@Faizanq
Faizanq / Keep selected tab on page refresh
Created June 25, 2019 05:49
Keep selected tab on page refresh
$(document).ready(function() {
if (location.hash) {
$("a[href='" + location.hash + "']").tab("show");
}
$(document.body).on("click", "a[data-toggle='tab']", function(event) {
location.hash = this.getAttribute("href");
});
});
$(window).on("popstate", function() {
var anchor = location.hash || $("a[data-toggle='tab']").first().attr("href");
https://linuxscriptshub.com/uninstall-completely-remove-mysql-ubuntu-16-04/
https://askubuntu.com/questions/634082/how-to-install-android-studio-on-ubuntu
sudo apt-get update
sudo apt-get install apache2
sudo a2enmod headers proxy_http xml2enc proxy ssl proxy_wstunnel rewrite
Note: rewrite // this mode is to enable htaccess
for .htaccess to work enabled mode rewrite
sudo nano /etc/apache2/apache2.conf