Skip to content

Instantly share code, notes, and snippets.

View psgganesh's full-sized avatar
🤖
Currently exploring: DS and ML

Shankar Ganesh psgganesh

🤖
Currently exploring: DS and ML
View GitHub Profile
@psgganesh
psgganesh / Verifying my Blockstack ID is secured
Last active June 23, 2019 06:20
Verifying my Blockstack ID is secured
Verifying my Blockstack ID is secured with the address 12Cp9rsfKCeWf1mVvU3wVBkVWaHn2RaMUD https://explorer.blockstack.org/address/12Cp9rsfKCeWf1mVvU3wVBkVWaHn2RaMUD
@psgganesh
psgganesh / .env.travis
Created May 25, 2019 04:22 — forked from gilbitron/.env.travis
Laravel 5 Travis CI config
APP_ENV=testing
APP_KEY=SomeRandomString
DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
@psgganesh
psgganesh / laravel_facades.md
Created February 27, 2019 02:04 — forked from poing/laravel_facades.md
Laravel Facades

Understanding Facades in Laravel

What's a Facade?

The Laravel explination, shown below is confusing.

Facades provide a "static" interface to classes that are available in the application's service container. Laravel ships with many facades which provide access to almost all of Laravel's features. Laravel facades serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

Many examples use Cache::get('key') to demonstrate how a Facade works. Comparing the following code to the utility that a Facade provides.

@psgganesh
psgganesh / ConfigServiceProvider.php
Created October 10, 2018 03:56 — forked from chuckrincon/ConfigServiceProvider.php
Load all your lumen config files painless.
<?php
namespace App\Providers;
use Illuminate\Support\Facades\App;
use Illuminate\Support\ServiceProvider;
use Illuminate\Contracts\Filesystem\FileNotFoundException;
class ConfigServiceProvider extends ServiceProvider
{
@psgganesh
psgganesh / learning-resources.md
Created September 5, 2018 15:08 — forked from imaginate/learning-resources.md
Resources for learning about technical topics like computer science, programming, web development, algorithms, and more.

Grow Your Mind!

  • Computer Science: Offers in-depth resources for learning and improving your skills with computer science, programming, algorithms, data structures, and more.
  • Operating Systems: Covers operating systems and their tools.
  • Web Development: Offers abundant resources for topics like browsers, CSS, DOM, HTML, JavaScript, Node.js, PHP, and Python. It contains many different manuals, tools, libraries, shortcuts, and more.

Computer Science

CS Education

@psgganesh
psgganesh / custom-vs-code-fonts.md
Last active March 25, 2024 14:27
Custom fonts for vs code!
@psgganesh
psgganesh / assignment3.md
Created March 11, 2018 12:58 — forked from mGalarnyk/assignment3.md
R Programming Programming Assignment 3 (Week 4) John Hopkins Data Science Specialization Coursera for the github repo https://github.com/mGalarnyk/datasciencecoursera
@psgganesh
psgganesh / README.md
Last active February 12, 2018 04:11
Use laravel / envoy for smoother deployments on forge servers

Adding envoy globally using

composer global require laravel/envoy

Update ~/.bashrc file to enable envoy on CLI

echo 'export PATH="$PATH:/home/forge/.config/composer/vendor/bin"' &gt;&gt; ~/.bashrc
@psgganesh
psgganesh / README.md
Last active October 16, 2017 12:35
Pass that .env to JS !

Cleaner way to pass over .env vars to javascript ( Laravel .env -> .js )

There are times when we wanted to pass .env vars over to javascript, regardless of what type of framework is being used.

We tried the following methods.

  • Passed to a js var wrapped inside a laravel blade file - which works but when viewed over the browser all the vars will be visible.We have stumbled over code where the js is embedded
  • One step ahead, we used jeffery way's re-usable package PHP-Vars-To-JS
  • One step further, we started passing the values over the meta attributes instead of cluttering the .blade.php files
  • One more step ahead, probably this is the cleaner way - as .env is just another hidden file, why not let webpack and node read it !
@psgganesh
psgganesh / 0_readme.md
Last active August 14, 2017 02:31
Hijack laravel exceptions

In-house incident handling

Just like how services like

Would do. Just one change, those would be added inside laravel project as a package where they would hijack the same from.