Skip to content

Instantly share code, notes, and snippets.

View ambakshi's full-sized avatar

Amit Bakshi ambakshi

View GitHub Profile
@ambakshi
ambakshi / bootstrap-p4p.sh
Last active November 12, 2015 15:24
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 December 11, 2020 02:52
Amazon Linux cloud-init script
#!/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 November 13, 2015 03:55
vimrc minimal
" 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
@ambakshi
ambakshi / Autounattend.xml
Last active December 25, 2023 23:26
Diskpart script to create uefi partitions. Via https://technet.microsoft.com/en-us/library/Hh825686.aspx.
<?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 August 29, 2015 14:20
RancherOs Enable TLS
#!/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 January 18, 2016 05:13
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
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 August 29, 2015 14:17
Set your terminal title to host@dir
# Apppend this to your ~/.bashrc
function title () {
echo -ne "\033]0;$1\007"
}
function ssh () {
title "$*"
$(which ssh) "$@"
}
@ambakshi
ambakshi / fork.cpp
Last active February 24, 2023 21:47
//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 January 14, 2015 08:40
keybase.io github proof

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:

@ambakshi
ambakshi / README.md
Last active August 29, 2015 14:12 — forked from zenorocha/README.md

Project Name

TODO: Write a project description

Installation

TODO: Describe the installation process

Usage