Skip to content

Instantly share code, notes, and snippets.

View aliakhtar's full-sized avatar

Ali Akhtar aliakhtar

View GitHub Profile
@aliakhtar
aliakhtar / gitstats.sh
Created September 10, 2018 00:06 — forked from xeoncross/gitstats.sh
Git - calculate how many lines of code were added/changed by someone
# Run this in the project repo from the command-line
# http://stackoverflow.com/a/4593065/99923
git log --shortstat --author "Xeoncross" --since "2 weeks ago" --until "1 week ago" | grep "files changed" | awk '{files+=$1; inserted+=$4; deleted+=$6} END {print "files changed", files, "lines inserted:", inserted, "lines deleted:", deleted}'
@aliakhtar
aliakhtar / ParseRSAKeys.java
Created January 22, 2018 14:47 — forked from destan/ParseRSAKeys.java
Parse RSA public and private key pair from string in Java
import java.io.IOException;
import java.net.URISyntaxException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
import java.security.interfaces.RSAPublicKey;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.PKCS8EncodedKeySpec;
apiVersion: v1
kind: ReplicationController
metadata:
labels:
name: influxGrafana
name: influxdb-grafana
namespace: kube-system
spec:
replicas: 1
selector:
@aliakhtar
aliakhtar / Penn Treebank II Tags.md
Created February 19, 2016 17:46 — forked from nlothian/Penn Treebank II Tags.md
Penn Treebank II Tags
@aliakhtar
aliakhtar / capybara cheat sheet
Created January 16, 2016 20:28 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')