Skip to content

Instantly share code, notes, and snippets.

Always creating something cool

Edward Muya Mwangi muyaedward

Always creating something cool
Block or report user

Report or block muyaedward

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nasrulhazim / ForgotPasswordController.php
Last active Nov 22, 2019
Laravel: Forgot Password Controller for API
View ForgotPasswordController.php
namespace App\Http\Controllers\Api\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
use Illuminate\Support\Facades\Password;
class ForgotPasswordController extends Controller
benmccallum / _Instructions
Last active Dec 30, 2019
nuxtjs, vue-bootstrap with custom bootstrap build
View _Instructions
1. Install bootstrap as a dev dependency, and its dependencies (node-sass and sass-loader)
`npm install --save-dev bootstrap@4.0.0-beta.2 node-sass sass-loader`
2. Install nuxt plugin of bootstrap vue (includes bootstrap-vue as a dependency)
`npm install @nuxtjs/bootstrap-vue`
3. Register plugin as module in nuxt.config.js (see below)
4. Create app.scss entry point (see below)
javilobo8 / download-file.js
Last active Jan 16, 2020
Download files with AJAX (axios)
View download-file.js
url: 'http://localhost:5000/static/example.pdf',
method: 'GET',
responseType: 'blob', // important
}).then((response) => {
const url = window.URL.createObjectURL(new Blob([]));
const link = document.createElement('a');
link.href = url;
link.setAttribute('download', 'file.pdf');
gokulkrishh / media-query.css
Last active Jan 16, 2020
CSS Media Queries for Desktop, Tablet, Mobile.
View media-query.css
##Device = Desktops
##Screen = 1281px to higher resolution desktops
@media (min-width: 1281px) {
anam-hossain / modal-video-full.html
Created May 8, 2015
Full example - autoplay youtube video in a Modal (Bootstrap + Jquery)
View modal-video-full.html
<link rel="stylesheet" href="">
<script src=""></script>
<script src=""></script>
$(function() {
$(".video").click(function () {
var theModal = $(this).data("target"),
videoSRC = $(this).attr("data-video"),
mauris / queue-ensure.php
Created Apr 28, 2014
Laravel Artisan Queue Ensurer - Set a cron job to run this file periodically to ensure that Laravel's queue is processing all the time. If the queue listener stopped, restart it!
View queue-ensure.php
function runCommand ()
$command = 'php artisan queue:listen > /dev/null & echo $!';
$number = exec($command);
file_put_contents(__DIR__ . '/', $number);
if (file_exists(__DIR__ . '/')) {
tinotriste / breadcrumbs-functions.php
Last active Jan 4, 2020
Wordpress: Breadcrumbs function
View breadcrumbs-functions.php
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
Integralist /
Created Feb 21, 2012
Basic set-up of remote git repository on a standard server

Set-up remote git repository on a standard server

The first thing to do is to install Git on the remote server.

Once you do that the rest of the process is split into three sections:

  1. Server set-up
  2. Local set-up (push commits)
  3. Server (pull commits)
oodavid /
Last active Dec 24, 2019 — forked from aronwoost/
Deploy your site with git

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
    • apache's home directory is /var/www/
You can’t perform that action at this time.