- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
This file contains hidden or 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
def extractDirectory(zipName, directoryName, destFilePath): | |
try: | |
with zipfile.ZipFile(zipName) as z: | |
for file in z.namelist(): | |
if file.startswith(directoryName) and file != directoryName + '/': | |
path = os.path.join(destFilePath, 'Any/subsequent/dirs') | |
dirtemp = '/'.join(path.split('/')[0:-1]) | |
Path(dirtemp).mkdir(parents=True, exist_ok=True) | |
with z.open(file) as zf, open(path, 'wb') as f: | |
shutil.copyfileobj(zf, f) |
This file contains hidden or 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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
usage() { | |
cat <<EOF |
This file contains hidden or 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
######### | |
# Aliases | |
######### | |
# Always copy contents of directories (r)ecursively and explain (v) what was done | |
alias cp='cp -rv' | |
# List contents with colors for file types, (A)lmost all hidden files (without . and ..), in (C)olumns, with class indicators (F) | |
alias ls='ls --color=auto -ACF' | |
# List contents with colors for file types, (a)ll hidden entries (including . and ..), use (l)ong listing format, with class indicators > | |
alias ll='ls --color=auto -alF' |
This file contains hidden or 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
#################################################################################################################### | |
# # | |
# SCRIPT NAME : Handle_VMs.ps1 # | |
# # | |
# DESCRIPTION : Here are the things that this script can do: # | |
# 1. Download build for given version, Extract it and delete the compressed files # | |
# 2. Generate log file # | |
# 3. Deploy VM with Given IP and downloaded OVF File # | |
# 4. Force parameter to power off and rename any existing VMs wit |
This file contains hidden or 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/bash | |
############################################################################################################### | |
###### | |
###### Author : Hiren Barad | |
###### Date : 22-Aug-2018 | |
###### Version : 1.0 | |
###### FileName : Termux_Youtube_Downloader.sh | |
###### Description : This script will create a folder with name as Youtube in your Phone's main memory, |
This file contains hidden or 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
################## | |
# Privacy Settings | |
################## | |
# Privacy: Let apps use my advertising ID: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 0 | |
# To Restore: | |
#Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AdvertisingInfo -Name Enabled -Type DWord -Value 1 | |
# Privacy: SmartScreen Filter for Store Apps: Disable | |
Set-ItemProperty -Path HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppHost -Name EnableWebContentEvaluation -Type DWord -Value 0 |
This file contains hidden or 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
#Installing chocolatey if it is not Installed | |
if($(choco | grep 'Chocolatey v' | wc -l) -ne 1) | |
{ | |
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
} | |
# Simple environment setup script | |
# Install Applications | |
choco install 7zip |