Skip to content

Instantly share code, notes, and snippets.

View psgk's full-sized avatar
#️⃣
'i' s d reason 4 al sorts o issues...

Parthasarathi G K psgk

#️⃣
'i' s d reason 4 al sorts o issues...
View GitHub Profile
@psgk
psgk / gitcheats.txt
Created April 21, 2020 12:03 — forked from chrismccoy/gitcheats.txt
git cheats
# shortform git commands
alias g='git'
# pretty tab'd git log
git log --graph --pretty="tformat:%h*(%ar)*<%an>*%d %s" $* | sed -Ee 's/(^[^<]*) ago\)/\1)/' | sed -Ee 's/(^[^<]*), [[:digit:]]+ .*months?\)/\1)/' | column -s '*' -t | cat
# change author of all git repos
git filter-branch -f --env-filter "GIT_AUTHOR_NAME='yourname'; GIT_AUTHOR_EMAIL='youremail@example.com'; GIT_COMMITTER_NAME='yourname'; GIT_COMMITTER_EMAIL='youremail@example.com';" HEAD;
# stage only deleted files
@psgk
psgk / FakeDbSet.cs
Created June 19, 2018 04:59 — forked from LukeWinikates/FakeDbSet.cs
An implementation of IDbSet to help with mocking Entity Framework DbContexts.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace EntityExtensions {
public class FakeDbSet<T> : System.Data.Entity.IDbSet<T> where T : class {
private readonly List<T> list = new List<T>();
public FakeDbSet() {
@psgk
psgk / coverage.js
Created February 28, 2018 05:30 — forked from ebidel/coverage.js
CSS/JS code coverage during lifecycle of page load
/**
* @author ebidel@ (Eric Bidelman)
* License Apache-2.0
*
* Shows how to use Puppeeteer's code coverage API to measure CSS/JS coverage across
* different points of time during loading. Great for determining if a lazy loading strategy
* is paying off or working correctly.
*
* Install:
* npm i puppeteer chalk cli-table