Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am ankitrgadiya on github.
  • I am ankitgadiya (https://keybase.io/ankitgadiya) on keybase.
  • I have a public key ASDsauSU64HezFBDi3418Z7WEmwO5ToJrBQKGXrErq8Gjgo

To claim this, I am signing this object:

@ankitrgadiya
ankitrgadiya / cvimrc
Last active January 20, 2019 09:22
cVim Configurations
set autofocus
set smoothscroll
let searchlimit=5
let completionengines=["google", "wikipedia"]
let defaultengine="google"
let homedirectory="/home/elliot/"
let barposition="top"
@ankitrgadiya
ankitrgadiya / .gitlab-ci.yml
Last active October 26, 2018 17:53
Sample files
image: ankitrgadiya/pandoc
pages:
script:
- make all
- mv html public
artifacts:
paths:
- public
only:
@ankitrgadiya
ankitrgadiya / sitemap-gen.sh
Created September 6, 2018 05:22
Generate Sitemap
#!/bin/sh
echo '<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' > sitemap.xml
find html/ -type f -name '*.html' | sed -e 's@^@<url><loc>$(HOST)@g' -e 's@$@</loc></url>@g' >> sitemap.xml
echo '</urlset>' >> sitemap.xml
-----BEGIN CERTIFICATE-----
MIID7DCCAtSgAwIBAgIUH5RFZn99LL9UxiDfD17ZUYIXnfIwDQYJKoZIhvcNAQEL
BQAwgY0xCzAJBgNVBAYTAklOMRIwEAYDVQQIEwlSYWphc3RoYW4xFTATBgNVBAcT
DENoaXR0YXVyZ2FyaDESMBAGA1UEChMJQVJHUEUgSW5jMR4wHAYDVQQLExVDZXJ0
aWZpY2F0ZSBBdXRob3JpdHkxHzAdBgNVBAMTFmFyZ0NBIFJvb3QgQ2VydGlmaWNh
dGUwHhcNMTkwMzMxMTc0MDAwWhcNMjQwMzI5MTc0MDAwWjCBjTELMAkGA1UEBhMC
SU4xEjAQBgNVBAgTCVJhamFzdGhhbjEVMBMGA1UEBxMMQ2hpdHRhdXJnYXJoMRIw
EAYDVQQKEwlBUkdQRSBJbmMxHjAcBgNVBAsTFUNlcnRpZmljYXRlIEF1dGhvcml0
eTEfMB0GA1UEAxMWYXJnQ0EgUm9vdCBDZXJ0aWZpY2F0ZTCCASIwDQYJKoZIhvcN
AQEBBQADggEPADCCAQoCggEBAKP8zrKOI5DL+b3vueMotXFHjh5Yni2sMP17U72y
@ankitrgadiya
ankitrgadiya / names.py
Created August 31, 2018 08:39
Generate random names
#!/usr/bin/python3
"""
Generate random names
"""
from random import sample
from string import ascii_lowercase
from sys import argv
#include <stdio.h>
char s[] = {
'\n','}',';',
'\n','i','n','t',' ','m','a','i','n','(','v','o','i','d',')',
'\n','{',
'\n','\t','i','n','t',' ','i',';',
'\n',
'\n','\t','p','r','i','n','t','f','(','\"','#','i','n','c','l','u','d','e',
' ','<','s','t','d','i','o','.','h','>','\\','n','c','h','a','r',' ',
's','[',']',' ','=',' ','{','\\','n','\"',')',';',
@ankitrgadiya
ankitrgadiya / answers.txt
Created August 13, 2018 05:41
CS50 Pset2 Crack Answers
50fkUxYHbnXGw: rofl
50xcIMJ0y.RXo: YES
50mjprEcqC/ts: CA
50GApilQSG3E2: UPenn
50n0AAUD.pL8g: lloyd
50CcfIk1QrPr6: maybe
509nVI8B9VfuA: TF
50JIIyhDORqMU: nope
50JGnXUgaafgc: ROFL
51u8F0dkeDSbY: NO
@ankitrgadiya
ankitrgadiya / README.md
Last active July 31, 2018 08:11
Doch - Docker Helper

Doch

It is a dirty script which basically helps me run and stop pre-defined containers on Euclid. It just uses subprocess in Python to run the commands with the options pre-defined in CONTAINERS dictionary. This script is actually port of docker-func script which I wrote in Bash few months ago for the same thing. The point of this is so that I don't have to remember and type all the options that need to be specified for those containers.

Functions:

names()

names function takes no arguments can returns a list of names of all the running containers. It gets the names from the docker ps command and no third party module is involved in it.

@ankitrgadiya
ankitrgadiya / install.sh
Last active July 28, 2018 13:35
Vim Packages Install
#!/bin/bash
mkdir -p ~/.vim/pack/{colorschemes,plugins}/{opt,start}
cd ~/.vim/pack/colorschemes/start/
wget https://github.com/morhetz/gruvbox/archive/master.zip
unzip master.zip
mv gruvbox-master gruvbox
rm master.zip