Skip to content

Instantly share code, notes, and snippets.

@pantasio
pantasio / profile.ps1
Created May 16, 2020 22:14 — forked from sixeyed/profile.ps1
PowerShell profile with a Linux-style prompt and aliases for common Docker commands
function Prompt(){
$W = Split-Path -leaf -path (Get-Location)
$prompt = Write-Prompt "$($env:UserName)@$($env:ComputerName):" -ForegroundColor Green
$prompt += Write-Prompt $W -ForegroundColor DarkCyan
$prompt += Write-Prompt '>'
return ' '
}
function Remove-StoppedContainers {
docker container rm $(docker container ls -q)
@pantasio
pantasio / .gitconfig
Created May 16, 2020 22:02 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
[user]
name = Pavan Kumar Sunkara
email = pavan.sss1991@gmail.com
username = pksunkara
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
[sendemail]
smtpencryption = tls
@pantasio
pantasio / container_ip.bash
Created September 2, 2019 19:14 — forked from zainengineer/container_ip.bash
Get docker container ip
#!/usr/bin/env bash
#inside docker container
HOST_IP=$(/sbin/ip route|awk '/default/ { print $3 }')
CONTAINER_IP=$(curl "$HOST_IP:8000" 2>/dev/null)
echo "container ip is $CONTAINER_IP"
@pantasio
pantasio / AdbCommands
Created March 29, 2018 07:07 — forked from Pulimet/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@pantasio
pantasio / nginx_basics.md
Created March 9, 2016 10:14 — forked from leommoore/nginx_basics.md
Nginx Basics

#Nginx Basics for Ubuntu

Please see http://wiki.nginx.org/Main for more information. See http://arstechnica.com/gadgets/2012/11/how-to-set-up-a-safe-and-secure-web-server/ for a tutorial on how to install Nginx.

##Installation To install, you can install the version which is in the standard Ubuntu repositories but it is normally quite old and will not have the latest security patches. The best way is to update the repositories first:

apt-get update
apt-get install python-software-properties

apt-get upgrade

@pantasio
pantasio / fish_prompt
Last active March 7, 2016 08:33 — forked from artemeff/fish_prompt
My fish prompt
# ~/.config/fish/functions/fish_prompt.fish
# name: Robbyrussell edited
# author: Bruno Ferreira Pinto, edit by Yuri Artemev
function fish_prompt
if not set -q -g __fish_robbyrussell_art_functions_defined
set -g __fish_robbyrussell_art_functions_defined
function _git_branch_name
echo (git rev-parse --abbrev-ref HEAD ^/dev/null)