Skip to content

Instantly share code, notes, and snippets.

🤙
Available

Ndirangu Waweru nwaweru

🤙
Available
Block or report user

Report or block nwaweru

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
@rvl
rvl / git-pushing-multiple.rst
Created Feb 9, 2016
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.
View git-pushing-multiple.rst

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just

@Adirael
Adirael / fix-wordpress-permissions.sh
Created Aug 17, 2012
Fix wordpress file permissions
View fix-wordpress-permissions.sh
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@bradtraversy
bradtraversy / sample.md
Created Mar 23, 2018
Markdown Cheat Sheet
View sample.md

Heading 1

Heading 2

Heading 3

Heading 4

Heading 5
Heading 6

This text is italic

@marijn
marijn / README.markdown
Last active Mar 25, 2020
List of nationalities in YAML, CSV and TXT format
View README.markdown

List of nationalities

It's time someone compiled a list of nationalities to use within a web application. This gist attempts to make a first move at that.

List of countries

I've also compiled a list of countries

@mlocati
mlocati / exceptions-tree.php
Created Mar 9, 2017
Throwable and Exceptions tree
View exceptions-tree.php
<?php
if (!function_exists('interface_exists')) {
die('PHP version too old');
}
$throwables = listThrowableClasses();
$throwablesPerParent = splitInParents($throwables);
printTree($throwablesPerParent);
if (count($throwablesPerParent) !== 0) {
die('ERROR!!!');
@mtwalsh
mtwalsh / deploy.php
Last active Mar 11, 2020
Deployer recipe for Laravel projects.
View deploy.php
<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'enovate.co.uk');
// Project repository
set('repository', 'git@githosting.com:enovatedesign/project.git');
View PhpStorm - Laravel Mix Alias Path Resolve Issue.js
// On PhpStorm, when ussing with laravel mix, for Alias path resolving in components you have to:
// - create a webpack.config.js file separately like:
const path = require('path')
const webpack = require('webpack')
module.exports = {
...
resolve: {
extensions: ['.js', '.json', '.vue'],
@aurawindsurfing
aurawindsurfing / cloudSettings
Last active Feb 20, 2020
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-07-27T19:36:28.740Z","extensionVersion":"v3.4.1"}
@fhdalikhan
fhdalikhan / AuthServiceProvider.php
Created Mar 26, 2019 — forked from ralphschindler/AuthServiceProvider.php
Laravel 5.8 Policy Guesser For Using "Models" Directory
View AuthServiceProvider.php
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
{
/**
You can’t perform that action at this time.