Skip to content

Instantly share code, notes, and snippets.

View soham2008xyz's full-sized avatar
👨‍💻
Sprint-mode ON!

Soham Banerjee soham2008xyz

👨‍💻
Sprint-mode ON!
View GitHub Profile
@soham2008xyz
soham2008xyz / SecureHeadersMiddleware.php
Created October 28, 2021 06:09 — forked from chetans9/SecureHeadersMiddleware.php
Laravel Secure Headers Middleware
<?php
namespace App\Http\Middleware;
use Closure;
class SecureHeadersMiddleware
{
// Enumerate headers which you do not want in your application's responses.
// Great starting point would be to go check out @Scott_Helme's:
// https://securityheaders.com/
@soham2008xyz
soham2008xyz / solarized-dark.css
Created June 29, 2020 12:40 — forked from nicolashery/solarized-dark.css
Solarized theme stylesheets for Jekyll and Pygments
/* Solarized Dark
For use with Jekyll and Pygments
http://ethanschoonover.com/solarized
SOLARIZED HEX ROLE
--------- -------- ------------------------------------------
base03 #002b36 background
base01 #586e75 comments / secondary content
@soham2008xyz
soham2008xyz / Three Wise Monkeys.md
Created April 18, 2020 21:09
Three Wise Monkeys (NDA)

Date: [date]

Between us [company name] and you [customer name].

Summary:

In short; neither of us will share any confidential information about each-other, by any means, with anyone else.

What’s confidential information?

@soham2008xyz
soham2008xyz / gist:b737f150407bbc958d771a4acf835048
Created February 20, 2020 02:45 — forked from pushmatrix/gist:6570585
How to get started building a ship tracking app.
- Find an API that supplies the data.
- I found the one that MarineTraffic.com uses (http://www.marinetraffic.com)
- Open your computer's terminal, and paste this:
curl 'http://www.marinetraffic.com/ais/getjson.aspx?sw_x=0&sw_y=70&ne_x=30&ne_y=80&zoom=6&fleet=&station=0&id=null' -H 'Referer: http://www.marinetraffic.com/ais/'
- This shows you all the data. You will now need to automate calling this API
- Get the data from the API using something like jQuery:
- Documentation: http://api.jquery.com/jQuery.getJSON/
- Tutorial :http://www.youtube.com/watch?v=3hN4PrJ7R6A
@soham2008xyz
soham2008xyz / README.md
Created March 6, 2019 14:24 — forked from jhoff/README.md
Bash-only Laravel Artisan tab auto-complete

If you are an Oh-my-zsh user, see the Laravel 5 plugin

For the rest of us Bash users, all of the Laravel Artisan autocomplete solutions out there require installing a composer package to get a list of artisan commands. Turns out this isn't really necessary. Simply add the provided code in ~/.bash_profile ( or similarly sourced file ) and you'll get artisan command tab completes on any project on your system.

_artisan()
{
	COMP_WORDBREAKS=${COMP_WORDBREAKS//:}
	COMMANDS=`php artisan --raw --no-ansi list | sed "s/[[:space:]].*//g"`
	COMPREPLY=(`compgen -W "$COMMANDS" -- "${COMP_WORDS[COMP_CWORD]}"`)
@soham2008xyz
soham2008xyz / .htaccess
Created February 6, 2019 07:47 — forked from brickgale/.htaccess
Laravel force https for Heroku
#add this on public/.htaccess for Laravel
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP:X-Forwarded-Proto} !https
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
@soham2008xyz
soham2008xyz / userChrome.css
Last active January 31, 2019 15:50 — forked from oidualc/userChrome.css
Firefox Client Side Decorations: close, minimize, maximize on the left
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
#titlebar-max {
-moz-box-ordinal-group: 0;
}
#titlebar-content {
direction: rtl;
}
@soham2008xyz
soham2008xyz / My-bash-aliases.sh
Created January 23, 2019 07:35 — forked from suewonjp/My-bash-aliases.sh
My Bash aliases
if [ "Darwin" == $(uname) ]; then
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES; killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO; killall Finder /System/Library/CoreServices/Finder.app'
alias hibernateMode='sudo pmset -a hibernatemode 25'
alias sleepMode='sudo pmset -a hibernatemode 3'
alias f='open -a Finder '
fi
## Save keystrokes for directory navigation
alias ~='cd ~'
@soham2008xyz
soham2008xyz / 30_wpcli.config
Created November 2, 2018 07:47 — forked from Azrael808/30_wpcli.config
Elastic Beanstalk extension for installing WP CLI.
commands:
"01":
command: curl https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -o /usr/local/bin/wp
"02":
command: chmod +x /usr/local/bin/wp