Skip to content

Instantly share code, notes, and snippets.

View maacpiash's full-sized avatar
🕶️
using System.Reflection;

Ahad Chowdhury maacpiash

🕶️
using System.Reflection;
View GitHub Profile
@maacpiash
maacpiash / Program.cs
Last active February 5, 2018 18:56
The problem is that a class property with a private setter can be modified if the property is of reference type.
using System;
using System.Collections.Generic;
namespace DilemmaWithReference
{
class Program
{
static void Main(string[] args)
{
Person p = new Person();
@maacpiash
maacpiash / 1410575042.c
Last active March 5, 2018 17:08
NSU CSE 323 (IHa) Spring 2018
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/wait.h>
int main( void )
{
@maacpiash
maacpiash / ListShuffler.csproj
Last active April 24, 2018 18:16
A program to shuffle the lines of a text file
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ExcelDataReader" Version="3.4.0" />
<PackageReference Include="ExcelDataReader.DataSet" Version="3.4.0" />
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.0</TargetFramework>
</PropertyGroup>
</Project>
@maacpiash
maacpiash / RefTest.cs
Created July 20, 2018 12:13
Testing different types of pass-by/return types: value vs reference
using System;
using static System.Console;
namespace RefTest
{
class Program
{
static void Main(string[] args)
{
ValVal(); // Returns value, pass by value
@maacpiash
maacpiash / Program.cs
Created February 6, 2019 11:03
Testing Delegates
using System;
namespace DelegateTesting
{
class Program
{
public static void Main(string[] args)
{
SaySomething s = SayHello;
Print(s);
@maacpiash
maacpiash / 90210.theme.bash
Created February 15, 2019 12:45
Bash-It Themes Customized
#!/usr/bin/env bash
SCM_THEME_PROMPT_DIRTY=" ${red}✗"
SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓"
SCM_THEME_PROMPT_PREFIX=" |"
SCM_THEME_PROMPT_SUFFIX="${green}|"
GIT_THEME_PROMPT_DIRTY=" ${red}✗"
GIT_THEME_PROMPT_CLEAN=" ${bold_green}✓"
GIT_THEME_PROMPT_PREFIX=" ${green}|"
GIT_THEME_PROMPT_SUFFIX="${green}|"
using System;
namespace DelegateMath
{
class Program
{
static void Main(string[] args)
{
PrintResult(Multiply, 5, 12);
}
@maacpiash
maacpiash / upgrade-mui-v0-v4.md
Last active December 6, 2019 08:25
A non-comprehensive guide to upgrading Material-UI from v0 to v4

Upgrading Material-UI from v0 to v4

LeftIcon, RightIcon

- import LeftIcon from 'material-ui/svg-icons/hardware/keyboard-arrow-left';
- import RightIcon from 'material-ui/svg-icons/hardware/keyboard-arrow-right';

+ import { KeyboardArrowLeftIcon, KeyboardArrowRightIcon } from '@material-ui/icons/Keyboard';