Skip to content

Instantly share code, notes, and snippets.

View ilearnbydoing's full-sized avatar

Durgesh Gupta ilearnbydoing

View GitHub Profile
{{root}}
{{nginx_access_log}}
{{nginx_error_log}}
if ($scheme != "https") {
rewrite ^ https://$host$uri permanent;
}
location ~ /.well-known {
@wmandai
wmandai / AppServiceProvider.php
Created June 23, 2021 21:21 — forked from greenspace10/AppServiceProvider.php
Laravel, Livewire, Alpine JS Toast Notifications
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Component::macro('notify', function ($message, $title = '', $type = 'success') {
$this->dispatchBrowserEvent('notify', ['message' => $message, 'title' => $title, 'type' => $type]);
});
@ilearnbydoing
ilearnbydoing / Coffee.js
Created April 27, 2021 01:17 — forked from agneym/Coffee.js
Buy me a Coffee with React and Styled Components
import React from 'react';
import styled from 'styled-components';
const Button = styled.a`
line-height: 2;
height: 5rem;
text-decoration: none;
display:inline-flex;
color: #FFFFFF;
background-color: #FF813F;
@lineharo
lineharo / gist:be84e6a9309c035ec79c4219adc36966
Created April 25, 2020 18:49
Install VestaCP(nginx+apache, vsftpd, exim+devocot, DNS named, MySQL) + PHP-7.4 on Ubuntu 18.04 LTS
sudo apt-get update
sudo apt-get install -y vim git curl wget unzip zip gcc build-essential make
sudo apt-get install software-properties-common
curl -O http://vestacp.com/pub/vst-install.sh
bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd yes --proftpd no --iptables yes --fail2ban yes --quota no --exim yes --dovecot yes --spamassassin no --clamav no --softaculous no --mysql yes --postgresql no
@gopalkildoliya
gopalkildoliya / Account.vue
Created October 21, 2019 10:51
VueJs Component for Paddle
<template>
<div>
<div class="content has-text-centered" v-if="user">
<button @click="subscribe">Checkout</button>
</div>
</div>
</template>
<script
import {db, firebase} from "../db";
@kreativan
kreativan / dropzone.php
Last active February 11, 2024 12:17
Upload files with dropzone.js and php
<?php
// process $_POST request
if(isset($_POST["submitDropzone"])) {
// Do something
print_r($_POST);
}
?>
@escopecz
escopecz / form.html
Last active April 23, 2024 17:29
An example of how to send a form submission to a Mautic form with jQuery
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mautic Form Test</title>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
@berkedel
berkedel / flow-error-icu4c-not-loaded.md
Created April 4, 2018 14:13
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

How to solve dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

brew uninstall --ignore-dependencies node icu4c
brew install node
@peterbrinck
peterbrinck / Laravel on VestaCP.md
Last active July 2, 2023 14:49
Laravel web templates for VestaCP

I'm not using this or VestaCP anymore, so I can't confirm if still working or not.

I've made a new web template to make Laravel work easily on VestaCP, and so I wouldn't have to change my Laravel installation, if I ever wanted to deploy it elsewhere.

Each file should be put in /usr/local/vesta/data/templates/web/apache2

Then, when you edit your domain/site, you can change the web template to Laravel and just upload your whole project into public_html

@MustansirZia
MustansirZia / index.js
Last active May 17, 2020 10:20
Reverse Geocode JS [ES7] Gist - Latitude/Longitude to local address.
/**
* Created by M on 15/04/17. With ❤
*/
/*
* Reverse Geocode JS [ES7] Gist. Converts latitude/longitude to a human readable address.
* Firstly, tries to judge whether the lat/long is over a road. If so, returns the local street address
* with state and country stripped out.
* If not, returns the local address for the nearest point of interest. (or place). The second condition works even if
* the lat/long belongs to a disputed territory such as Kashmir, India.