Skip to content

Instantly share code, notes, and snippets.

View sharifmamun's full-sized avatar
😀

Sharif Mamun sharifmamun

😀
View GitHub Profile
@sharifmamun
sharifmamun / Program.cs
Created December 14, 2023 10:46 — forked from kenwalger/Program.cs
C# and MongoDB Update Operation
using System;
using MongoDB.Bson;
using MongoDB.Driver;
namespace MongoDBCRUDExample
{
class Program
{
static void Main(string[] args)
@sharifmamun
sharifmamun / ssl.rules
Created August 3, 2022 15:13 — forked from konklone/ssl.rules
nginx TLS / SSL configuration options for konklone.com
# Basically the nginx configuration I use at konklone.com.
# I check it using https://www.ssllabs.com/ssltest/analyze.html?d=konklone.com
#
# To provide feedback, please tweet at @konklone or email eric@konklone.com.
# Comments on gists don't notify the author.
#
# Thanks to WubTheCaptain (https://wubthecaptain.eu) for his help and ciphersuites.
# Thanks to Ilya Grigorik (https://www.igvita.com) for constant inspiration.
server {
@sharifmamun
sharifmamun / refreash_helm.sh
Created July 12, 2022 20:25 — forked from naotookuda/refreash_helm.sh
How to refresh "helm" cache ?
# !/bin/bash
# Remove all files in these directories.
rm -rf ~/.helm/cache/archive/*
rm -rf ~/.helm/repository/cache/*
# Refreash repository configurations
helm repo update
#That's all.
#If you "helm search" next time, you can find newest stable charts in repository.
@sharifmamun
sharifmamun / mongodb_c#_cheatsheet.md
Created March 29, 2022 19:59 — forked from a3dho3yn/mongodb_c#_cheatsheet.md
MongoDB C# Driver Cheat Sheet

MongoDB C# Driver Cheat Sheet

(C) 2015 by Derek Hunziker, (C) 2017 by AppsOn

As of releasing MongoDB 3.4 and C# Driver v2.4, original cheatsheet by Derek is outdated. In addition, it has some deficiencies like connecting to MongoDB, creating indexes, etc. This updated version works fine with C# Driver v2.4.7 and MongoDB v3.4.

Setup

Define Document Models

Note: Defined models and collections will be used in entire cheatsheet.

@sharifmamun
sharifmamun / roslyn.txt
Last active March 8, 2018 16:22
My understanding about Roslyn
Roslyn helps opening up the black boxes and allowing tools and end users to share in the wealth of information compilers have about
our code.
Instead of being opaque source-code-in and object-code-out translators, through Roslyn, compilers become platforms—APIs that you
can use for code related tasks in your tools and applications.
It creates many opportunities for innovation in areas such as meta-programming, code generation and transformation, interactive
use of the C# and VB languages, and embedding of C# and VB in domain specific languages.
-------------------------------------------------------------------------------------------------------------
@sharifmamun
sharifmamun / flexbox.scss
Created October 20, 2017 16:10 — forked from richardtorres314/flexbox.scss
CSS Flexbox - Sass Mixins
// --------------------------------------------------
// Flexbox SASS mixins
// The spec: http://www.w3.org/TR/css3-flexbox
// --------------------------------------------------
// Flexbox display
@mixin flexbox() {
display: -webkit-box;
display: -moz-box;
display: -ms-flexbox;
import java.io.*;
import java.util.*;
/**
* https://class.coursera.org/algo/quiz/attempt?quiz_id=52
*/
public class MinCut {
private static class Graph {

#List of countries

It's time someone compiled a list of countries to use within a web application. This gist attempts to make a first move at that.

List of nationalities

I've also compiled a list of nationalities