Skip to content

Instantly share code, notes, and snippets.

View FBI23's full-sized avatar
🐢
Yarp

Yatin Badal FBI23

🐢
Yarp
View GitHub Profile
@FBI23
FBI23 / vagrant-share-multiple.md
Created April 11, 2016 16:07 — forked from stephan281094/vagrant-share-multiple.md
Using Vagrant share with multiple sites

Using Vagrant share with multiple sites

Vagrant share is a great feature that's quite handy to demo your application to clients. It basically allows you to share whatever you run locally on your VM, accessible by anybody who is connected to the internet. However, Vagrant share doesn't support multiple domains pointing to different applications on your virtual machine. Unless you use different ports. This document will teach you how to set your virtual machine up to allow sharing multiple projects with Vagrant share.

Note: This document is primary based on a virtual machine running Apache.

The setup

  1. Create a free account at HashiCorp's Atlas.
  2. Login using vagrant login.
<?php
// ...
protected $middleware = [
// ...
'App\Http\Middleware\ValidProxies',
];
// ...
@FBI23
FBI23 / multiple_ssh_setting.md
Created October 6, 2016 08:46 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@FBI23
FBI23 / Redirect to admin.php
Last active May 2, 2017 09:47
How to redirect WordPress frontend to the backendhttp://www.wprecipes.com/how-to-redirect-wordpress-frontend-to-the-backend
<?php
//Redirect To Admin Url WP
header("Location: ".get_admin_url());
exit();
?>
@FBI23
FBI23 / golang-nuts.go
Created December 21, 2017 11:43 — forked from ryanfitz/golang-nuts.go
two ways to call a function every 2 seconds
package main
import (
"fmt"
"time"
)
// Suggestions from golang-nuts
// http://play.golang.org/p/Ctg3_AQisl
@FBI23
FBI23 / AWS Security Resources
Created October 18, 2018 15:29 — forked from chanj/AWS Security Resources
AWS Security Resources
INTRO
I get asked regularly for good resources on AWS security. This gist collects some of these resources (docs, blogs, talks, open source tools, etc.). Feel free to suggest and contribute.
Short Link: http://tiny.cc/awssecurity
Official AWS Security Resources
* Security Blog - http://blogs.aws.amazon.com/security/
* Security Advisories - http://aws.amazon.com/security/security-bulletins/
* Security Whitepaper (AWS Security Processes/Practices) - http://media.amazonwebservices.com/pdf/AWS_Security_Whitepaper.pdf
* Security Best Practices Whitepaper - http://media.amazonwebservices.com/AWS_Security_Best_Practices.pdf
@FBI23
FBI23 / git-commit-log-stats.md
Created February 13, 2019 09:36 — forked from eyecatchup/git-commit-log-stats.md
Some commands to get git commit log statistics for a repository on the command line.

git commit stats

Commands to get commit statistics for a Git repository from the command line -
using git log, git shortlog and friends.




@FBI23
FBI23 / create-csv.sh
Created February 17, 2019 19:19 — forked from jexp/create-csv.sh
import git-log into neo4j with LOAD CSV
echo sha1,hash,parents,author_email,author_name,refs,subject,timestamp,date_time > git_log.csv
git log --reverse --format='format:"%H","%h","%P","%ae","%an","%d", "%s","%at","%ai"' >> git_log.csv
# Download and Unzip Neo4j
# Start Neo4j
/path/to/neo4j-community-2.1.5/bin/neo4j start
# Start Neo4j-Shell with your data
@FBI23
FBI23 / cloudflare-worker-force-lowercase.js
Created June 19, 2019 14:31 — forked from availit/cloudflare-worker-force-lowercase.js
Cloudflare worker script to rewrite requests to lowercase, to prevent duplicate page URLs
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
/**
* Fetch and log a request
* @param {Request} request
*/
async function handleRequest(request) {
let url = request.url