Skip to content

Instantly share code, notes, and snippets.

View mii9000's full-sized avatar

ibrahim mii9000

View GitHub Profile
@davidfowl
davidfowl / .NET6Migration.md
Last active July 15, 2024 15:31
.NET 6 ASP.NET Core Migration
@hlaueriksson
hlaueriksson / Examples.cs
Last active November 12, 2023 21:19
PuppeteerSharp Documentation
using System;
using System.Threading.Tasks;
using NUnit.Framework;
namespace PuppeteerSharp.Contrib.Sample
{
public class Examples
{
async Task<IBrowser> Browser()
{
@stubailo
stubailo / fetch-graphql.js
Created September 5, 2017 08:15
Call a GraphQL API with fetch
require('isomorphic-fetch');
fetch('https://1jzxrj179.lp.gql.zone/graphql', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ query: '{ posts { title } }' }),
})
.then(res => res.json())
.then(res => console.log(res.data));
@vasanthk
vasanthk / System Design.md
Last active July 18, 2024 00:52
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
/*
Template
<!DOCTYPE html>
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/2.3.22/rx.all.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
@tsaqib
tsaqib / ideas.md
Last active July 8, 2024 07:53
Ideas that you can use for hackathons, competitions and research.

Ideas

I have collected and moderated these ideas from various public sources and put into one place so that problem solvers and solution developers may find inspirations. Because I wish to update it regularly, I have setup as a single page wiki. You may try these ideas on hackathons/competitions/research; some are quite intense problems and some are not. Many of the problems were prepared keeping Dhaka/Bangladesh in mind, but of course can be applied to just about any underdeveloped/developing and sometimes developed countries.

Categories:
  • Eradicate Extreme Poverty and Hunger
  • Education
  • Healthcare
  • Governance
@avimar
avimar / auth.tag
Created July 16, 2015 10:41
Example of riotj's router
<auth>
<login if={'login'==opts.action || 'logout' == opts.action} action={opts.action}></login>
<register if={'register' == opts.action}></register>
<change-pass if={'verifyEmail' == opts.action || 'changePass' == opts.action} action={opts.action} uid={opts.uid} data={opts.data}></changePass>
<script>
console.log(opts.action);
if(opts.action=='login' && Cookies.get('apiKey')) riot.route('myAccount');
if(opts.action=='register' && Cookies.get('apiKey')) riot.route('myAccount');
else if(opts.action=="" && Cookies.get('apiKey')) riot.route('myAccount');
@DanielSWolf
DanielSWolf / Program.cs
Last active July 16, 2024 20:29
Console progress bar. Code is under the MIT License: http://opensource.org/licenses/MIT
using System;
using System.Threading;
static class Program {
static void Main() {
Console.Write("Performing some task... ");
using (var progress = new ProgressBar()) {
for (int i = 0; i <= 100; i++) {
progress.Report((double) i / 100);
@DamianReeves
DamianReeves / .gitconfig
Created April 18, 2015 01:44
Using Visual Studio AS Git Merge Tool
[diff]
tool = vsdiffmerge
[difftool]
prompt = true
[difftool "vsdiffmerge"]
cmd = \"C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\Common7\\IDE\\vsdiffmerge.exe\" \"$LOCAL\" \"$REMOTE\" //t
keepbackup = false
trustexistcode = true
[merge]
tool = vsdiffmerge
@aaronk6
aaronk6 / README.md
Last active November 9, 2023 05:17
launchUri

Cross-browser implementation of navigator.msLaunchUri

Microsoft’s navigator.msLaunchUri method only works in Internet Explorer on Windows 8. Therefore I came up with a (nearly) cross-browser implementation that uses the native msLaunchUri when it’s available and falls back to adventurous hacks when running in other browsers.

Description

launchUri (uri, successCallback, noHandlerCallback, unknownCallback)