Skip to content

Instantly share code, notes, and snippets.

View nwaweru's full-sized avatar
🤙
Available

Ndirangu Waweru nwaweru

🤙
Available
View GitHub Profile
@aurawindsurfing
aurawindsurfing / cloudSettings
Last active August 31, 2022 10:45
Visual Studio Code Settings Sync Gist
{"lastUpload":"2019-07-27T19:36:28.740Z","extensionVersion":"v3.4.1"}
// 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'],
@mtwalsh
mtwalsh / deploy.php
Last active October 20, 2021 22:17
Deployer recipe for Laravel projects.
<?php
namespace Deployer;
require 'recipe/common.php';
// Project name
set('application', 'enovate.co.uk');
// Project repository
set('repository', 'git@githosting.com:enovatedesign/project.git');
@DNTech
DNTech / AXES IN COLUMN CHART.js
Last active April 19, 2024 08:30
Google Charts - Customizing Axes ( hAxis and vAxis ) | Code Based Learning by RichNet
<!-- AXES IN COLUMN CHART -->
<html>
<head>
<link href="/css/w3.css" rel="stylesheet" />
<link href="/css/print.min.css" rel="stylesheet" />
<script>
//Declaring Global Variables
var GV, CHT, DT, OPT;
function drawChart(){
GV = google.visualization;
@jakebathman
jakebathman / logslaravel.sh
Created August 19, 2018 00:06
Tail Laravel logs and filter out the stack traces
tail -f -n 450 storage/logs/laravel*.log \
| grep -i -E \
"^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \
--color
@Tamal
Tamal / git-ssh-error-fix.sh
Last active May 8, 2024 15:47
Solution for 'ssh: connect to host github.com port 22: Connection timed out' error
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj
Cloning into 'my-awesome-proj'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.
$ # This should also timeout
$ ssh -T git@github.com
ssh: connect to host github.com port 22: Connection timed out
$ # but this might work
@fhdalikhan
fhdalikhan / AuthServiceProvider.php
Created March 26, 2019 06:52 — forked from ralphschindler/AuthServiceProvider.php
Laravel 5.8 Policy Guesser For Using "Models" Directory
<?php
namespace App\Providers;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
{
/**

MySQL Cheat Sheet

Help with SQL commands to interact with a MySQL database

MySQL Locations

  • Mac /usr/local/mysql/bin
  • Windows /Program Files/MySQL/MySQL version/bin
  • Xampp /xampp/mysql/bin

Add mysql to your PATH

@Aroniez
Aroniez / kenyan_counties.json
Last active April 7, 2024 14:58
List of kenyan counties and their sub-counties in json format
[
{
"name": "Baringo",
"capital": "Kabarnet",
"code": 30,
"sub_counties": [
"Baringo central",
"Baringo north",
"Baringo south",
"Eldama ravine",