Skip to content

Instantly share code, notes, and snippets.

Avatar

Amit Bakshi ambakshi

View GitHub Profile
@ambakshi
ambakshi / bootstrap-p4p.sh
Last active Nov 12, 2015
bootstrap-p4p.sh
View bootstrap-p4p.sh
#!/bin/bash
#
# GCE startup script for a Perforce Proxy. Set the metadata keys to
# env-vars you'd like to set (for example, P4PORT=xyz:1666)
#
# Amit Bakshi
# 11/11/2015
set -ex
@ambakshi
ambakshi / cloud-init.sh
Last active Dec 11, 2020
Amazon Linux cloud-init script
View cloud-init.sh
#!/bin/bash
#
# Amazon Linux cloud-init script
#
# Amit Bakshi
# 10/2014
#
if [ `id -u` -ne 0 ]; then
sudo exec /bin/bash -x "$0" "$@"
fi
@ambakshi
ambakshi / vimrc
Last active Nov 13, 2015
vimrc minimal
View vimrc
" barebones https://gist.github.com/ambakshi/a0c226496e84f924ac2f/raw/vimrc
set nocompatible
set backspace=indent,eol,start
syntax on
filetype plugin indent on
set hidden
nnoremap ; :
" bonus settings
set smartcase
set incsearch
View Autounattend.xml
<?xml version="1.0" encoding="utf-8"?>
<unattend xmlns="urn:schemas-microsoft-com:unattend">
<settings pass="windowsPE">
<component name="Microsoft-Windows-International-Core-WinPE" processorArchitecture="amd64" publicKeyToken="31bf3856ad364e35" language="neutral" versionScope="nonSxS" xmlns:wcm="http://schemas.microsoft.com/WMIConfig/2002/State" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<SetupUILanguage>
<UILanguage>en-US</UILanguage>
</SetupUILanguage>
<InputLocale>en-US</InputLocale>
<SystemLocale>en-US</SystemLocale>
<UILanguage>en-US</UILanguage>
@ambakshi
ambakshi / rancheros-tls.sh
Last active Aug 29, 2015
RancherOs Enable TLS
View rancheros-tls.sh
#!/bin/bash
#
# Run from RancherOS, then from client
# ssh rancher 'cat tls.tar' | tar xf - -C ~/.docker
#
# Replace HOSTNAME_TO_USE with how you will address
# the docker host. DOCKER_HOST=tcp://somehost:2376
# means HOSTNAME_TO_USE=somehost
#
# Amit Bakshi
@ambakshi
ambakshi / comodo.crt
Last active Jan 18, 2016
COMODO RSA Domain Validation Secure Server CA. Installation. curl https://gist.github.com/ambakshi/0bea8934f3292277fc91/raw/a710075be297032b0d1598a9b2c0523bb8b39640/comodo.crt | sudo tee -a /etc/pki/tls/certs/ca-bundle.crt
View comodo.crt
Certificate: (openssl x509)
Data:
Version: 3 (0x2)
Serial Number:
2b:2e:6e:ea:d9:75:36:6c:14:8a:6e:db:a3:7c:8c:07
Signature Algorithm: sha384WithRSAEncryption
Issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Certification Authority
Validity
Not Before: Feb 12 00:00:00 2014 GMT
Not After : Feb 11 23:59:59 2029 GMT
@ambakshi
ambakshi / ssh-prompt-command.sh
Last active Aug 29, 2015
Set your terminal title to host@dir
View ssh-prompt-command.sh
# Apppend this to your ~/.bashrc
function title () {
echo -ne "\033]0;$1\007"
}
function ssh () {
title "$*"
$(which ssh) "$@"
}
View fork.cpp
//This is all pretty much from the ReactOS project...
#pragma once
#define _WIN32_WINNT 0x0502 // Change this to the appropriate value to target other versions of Windows.
#define DPRINT(...)
#define DPRINT1(...)
#include <stdlib.h>
#include <tchar.h>
@ambakshi
ambakshi / keybase.md
Created Jan 14, 2015
keybase.io github proof
View keybase.md

Keybase proof

I hereby claim:

  • I am ambakshi on github.
  • I am ambakshi (https://keybase.io/ambakshi) on keybase.
  • I have a public key whose fingerprint is F380 3FDD 4A64 3534 04A0 E431 DE66 394A C6CD 40AF

To claim this, I am signing this object:

View README.md

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage