Skip to content

Instantly share code, notes, and snippets.

View lru_main.go
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
package main
import (
"flag"
"fmt"
"log"
"os"
@agnivade
agnivade / margo.go
Created Nov 14, 2019
gosublime config
View margo.go
package margo
import (
"time"
"margo.sh/golang"
"margo.sh/mg"
)
// Margo is the entry-point to margo
View .prettierignore
**/jquery*
third_party/
testing/
View new.html
<tr>
<td class="pkg-name" style="padding-left: 0px;">
<a href="elgamal/">elgamal</a>
</td>
<td class="pkg-synopsis">
Package elgamal implements ElGamal encryption, suitable for OpenPGP, as specified in &#34;A Public-Key Cryptosystem and a Signature Scheme Based on Discrete Logarithms,&#34; IEEE Transactions on Information Theory, v.
</td>
</tr>
<tr>
<td class="pkg-name" style="padding-left: 0px;">
View main.go
package main
import (
"crypto/rsa"
"encoding/json"
"io/ioutil"
"log"
"net/http"
"os"
"time"
@agnivade
agnivade / commit-msg
Last active Jul 7, 2020
Bash file to check commit message structure
View commit-msg
#!/bin/bash
#http://chris.beams.io/posts/git-commit/#seven-rules
cnt=0
while IFS='' read -r line || [[ -n "$line" ]]; do
cnt=$((cnt+1))
length=${#line}
if [ $cnt -eq 1 ]; then
# Checking if subject exceeds 50 characters
if [ $length -gt 50 ]; then
echo "Your subject line exceeds 50 characters."
@agnivade
agnivade / vimrc
Last active Aug 29, 2015
my vimrc file
View vimrc
set number
set tabstop=2
set expandtab
set smartindent
set autoindent
set smarttab
set shiftwidth=2
set ignorecase
set incsearch
set hls