Skip to content

Instantly share code, notes, and snippets.

pantasio / profile.ps1
Created May 16, 2020 — forked from sixeyed/profile.ps1
PowerShell profile with a Linux-style prompt and aliases for common Docker commands
View profile.ps1
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 / .gitconfig
Created May 16, 2020 — forked from pksunkara/config
Sample of git config file (Example .gitconfig)
View .gitconfig
name = Pavan Kumar Sunkara
email =
username = pksunkara
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
excludesfile = ~/.gitignore
smtpencryption = tls
View container_ip.bash
#!/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"
View vagrant file example3
Vagrant.configure(2) do |config| = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.gui = false = "docker-example-vm"
vb.memory = "1024"
vb.cpus = 1
config.vm.provision "docker" do |d|
View vagrant file example2
Vagrant.configure(2) do |config| = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.gui = false = "docker-example-vm"
vb.memory = "1024"
vb.cpus = 1
config.vm.provision "docker" do |d|
View vagrant file example1
BASE_LOCAL_IP = "192.168.33"
$num_slaves = 2
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| = "ubuntu/trusty64"
pantasio / 69-libmtp.rules
Created Mar 30, 2018
View 69-libmtp.rules
Unable to open ~/.mtpz-data for reading, MTPZ disabled.# UDEV-style hotplug map for libmtp
# Put this file in /etc/udev/rules.d
ACTION!="add", GOTO="libmtp_rules_end"
ENV{MAJOR}!="?*", GOTO="libmtp_rules_end"
SUBSYSTEM=="usb", GOTO="libmtp_usb_rules"
pantasio / enable USB debug.adb
Created Mar 29, 2018
adb cmd enable USB debug cant touch screeen
View enable USB debug.adb
I got it to work :)
NOTE: This requires unlocked bootloader.
Connect the device to Mac or PC in recovery mode. (I had to map the process in my mind as the screen was broken).
Now open terminal/CMD in computer and go to platform-tools/. type and enter ./adb devices to check if the device is connected in recovery mode.
Now type ./adb shell mount data and ./adb shell mount system to mount the respective directories.
Get the persist.sys.usb.config file in your system using ./adb pull /data/property/persist.sys.usb.config /Your directory
Now open that file in a texteditor and edit it to mtp,adb and save.
Now push the file back in the device; ./adb push /your-directory/persist.sys.usb.config /data/property
pantasio / AdbCommands
Created Mar 29, 2018 — forked from Pulimet/AdbCommands
Adb useful commands list
View AdbCommands
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell

#Nginx Basics for Ubuntu

Please see for more information. See 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