Skip to content

Instantly share code, notes, and snippets.

Adil Hindistan AdilHindistan

Block or report user

Report or block AdilHindistan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View shortcut_to_user_variables
# launches window to edit "user" Environment Variables (Windows)
rundll32 sysdm.cpl, EditEnvironmentVariables
@AdilHindistan
AdilHindistan / fix-psrepository.ps1
Last active Jun 19, 2018
Fix PSGallery Registration
View fix-psrepository.ps1
Function Fix-PSRepository {
<#
Fixes the issue with PSGallery:
Find-Module <module_name> -> does not find anything
Get-PSRepository -> returns "Unable to find module repositories"
Register-PSRepository -Default -Verbose -> should fix it but behind the proxy, following should be run first
#>
[system.net.webrequest]::defaultwebproxy = new-object system.net.webproxy('http://proxy_address:proxy_port')
View concurrency.md
@AdilHindistan
AdilHindistan / aws_saml.py
Created Apr 10, 2018 — forked from JoeyG1973/aws_saml.py
aws saml login with session that auto refreshes.
View aws_saml.py
# Took this:
# https://s3.amazonaws.com/awsiammedia/public/sample/SAMLAPICLIADFS/samlapi_formauth_adfs3.py
# converted to boto3 and smooshed it together with this:
# https://gist.github.com/kapilt/ac8e222081f63ba64e93
# which gave birth too this:
import sys
import botocore
import boto3
import requests
View ansible-notes.md

Working with Ad-Hoc Ansible command

  • Add SSH Credentials ssh-add /path/to_cred_file.pem

  • contents of inventory.yml

   inventory.yml
   [dockerbuild]
   59.68.67.67
View Setup-Mac.md

Setup New Mac

Install Homebrew

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install, Setup Python

View Setup Python 2.7 on Windows 10
## Download & Install Python 2.7.x using the msi
https://www.python.org/downloads/
## Download pip from https://bootstrap.pypa.io/get-pip.py (Use PowerShell) to D:\Temp
PS C:\> Invoke-WebRequest -Uri 'https://bootstrap.pypa.io/get-pip.py' -OutFile D:\temp\get-pip.py
## Copy get-pip.py to Scripts folder under Python > Tools > Scripts
## Make sure you started PowerShell on an elevated window (Runas Administrator) as it needs to write to 'Program Files(x86)'
View Windows Control Panel Shortcuts
## Most useful
## Control > System and Security > System
control /name microsoft.System
## System Properties = Control > System and Security > System > Advanced System Settings
%Windir%\System32\SystemPropertiesAdvanced.exe
## Control > System and Security > Admin Tools
control /name microsoft.AdministrativeTools
@AdilHindistan
AdilHindistan / Cleanup Win10 QuickAccess
Created Jul 9, 2016
Cleanup recent (quick access) shortcuts for Windows 10
View Cleanup Win10 QuickAccess
#AH - Cleanup Win10 QuickAccess / Recent
rm "$($env:appdata)\Microsoft\windows\Recent\*" -force -recurse
@AdilHindistan
AdilHindistan / .gitignore
Created Mar 17, 2016 — forked from octocat/.gitignore
Some common .gitignore configurations
View .gitignore
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
You can’t perform that action at this time.