This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
format = '$all' | |
[username] | |
style_user = "green bold" | |
style_root = "red bold" | |
format = "[$user]($style) " | |
disabled = false | |
show_always = true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set number | |
set relativenumber | |
set tabstop=4 | |
set shiftwidth=4 | |
set softtabstop=4 | |
set expandtab | |
set hlsearch | |
hi Search ctermbg=LightBlue | |
hi Search ctermfg=DarkGreen | |
set incsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
create alias in git bash (C:\Program Files\Git\etc\bash.bashrc) | |
open as admin | |
alias sam="/c/Program\ Files/Amazon/AWSSAMCLI/bin/sam.cmd" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo -u www-data cmd | |
sudo -u ubuntu cmd | |
sudo -u server cmd | |
sudo -u user cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mongoexport --uri="" --collection=collection_name --out=collection_name.json | |
mongoimport --uri="" --collection=collection_name --file=collection_name.json | |
mongodump --uri="" --collection=collection_name | |
mongorestore --uri="" --db=db_name --collection=collection_name dump/db_name/collection_name | |
ref: https://hashinteractive.com/blog/mongodump-and-mongorestore-vs-mongoexport-and-mongoimport/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if [ -z "$1" ] | |
then | |
echo "No collection slug provided" | |
exit 1 | |
fi | |
coll_slug=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<img id="blah" alt="your image" width="100" height="100" /> | |
<input type="file" | |
onchange="document.getElementById('blah').src = window.URL.createObjectURL(this.files[0])"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace App\Traits; | |
trait SelfReferenceTrait | |
{ | |
protected $parentColumn = 'parent_id'; | |
public function parent() | |
{ | |
return $this->belongsTo(static::class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost 127.0.0.1> | |
DocumentRoot "D:/Projects/EnFeed/user/user-dashboard/public" | |
ServerName user.enfeed.com | |
<Directory "D:/Projects/EnFeed/user/user-dashboard/public"> | |
Options FollowSymLinks Indexes ExecCGI | |
AllowOverride All | |
Order deny,allow | |
Allow from 127.0.0.1 | |
Deny from all | |
Require all granted |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bash prompt | |
# get current branch in git repo | |
function parse_git_branch() { | |
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
if [ ! "${BRANCH}" == "" ] | |
then | |
STAT=`parse_git_dirty` | |
echo " [${BRANCH}${STAT}]" | |
else | |
echo "" |
NewerOlder