Skip to content

Instantly share code, notes, and snippets.

View mbaneshi's full-sized avatar
👋
happy coding

Mehdi Baneshi mbaneshi

👋
happy coding
View GitHub Profile

How To Use GitHub Gists For Publishing Articles

GitHub Gists may be used not only for code snippets sharing but as a publishing platform for your articles.

Features And Restrictions Of GitHub Gists

Each gist is a git repo with restrictions and features:

  • You can't create folders in any branch of the repo.
  • Each file in the master branch larger than 1MB risks to be truncated so you can't add zip archive to master. But you may keep additional large files at another branches which can't be viewed on the gist page.
  • If you want to use images in your article but wish non-embedded images to be hidden on the gist page then you may keep them in non-master branch and reference by .//raw//foobar.jpg.

Comparison of ASP.NET and Node.js for Backend Programming

We will compare ASP.NET and Node.js for backend programming.
Source codes from examples.

Updates

This document was published on 21.09.2015 for a freelance employer. Some changes since then (14.02.2016):

  1. Koa.js no longer uses co-routines, it has switched to Babel's async/await. yield and await are used almost in the same way, so I see no point to rewrite the examples.

Tuning Windows 10 for Slow Machines

Windows 10 on slow netbook

This guide is for those who dares to install Windows 10 on slow netbooks (1GB of RAM).
Though Windows update program is over, you still may use old Windows product keys from license stickers to install Windows 10 on old machines.

UPD Jan 2019
This article is quite old, some instructions may be obsolete.

@mbaneshi
mbaneshi / css-media-queries-cheat-sheet.css
Created September 3, 2022 06:05 — forked from bartholomej/css-media-queries-cheat-sheet.css
CSS Media Query Cheat Sheet (with Foundation)
/*------------------------------------------
Responsive Grid Media Queries - 1280, 1024, 768, 480
1280-1024 - desktop (default grid)
1024-768 - tablet landscape
768-480 - tablet
480-less - phone landscape & smaller
--------------------------------------------*/
@media all and (min-width: 1024px) and (max-width: 1280px) { }
@media all and (min-width: 768px) and (max-width: 1024px) { }
@mbaneshi
mbaneshi / app.jsx
Created June 26, 2022 21:45 — forked from eddywashere/app.jsx
higher order layout component example in React
import React from 'react';
import { render } from 'react-dom';
import {PageContent, PageSidebar} from './Content';
import Layout from './Layout';
const Example = Layout({Content: PageContent, Sidebar: PageSidebar});
render(Example, document.getElementById('app'))
@mbaneshi
mbaneshi / sample.js
Created January 31, 2022 18:19 — forked from WietseWind/sample.js
Fetching all issuer trustlines (node, websocket)
const { XrplClient } = require('xrpl-client')
const account = 'rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B' // The issuer, Bitstamp USD
const currency = 'USD'
const client = new XrplClient()
const main = async () => {
await client.ready()
const { account_data } = await client.send({ command: 'account_info', account })
@mbaneshi
mbaneshi / django_cheat_sheet.md
Created May 23, 2020 06:33 — forked from bradtraversy/django_cheat_sheet.md
Django command cheat sheet

Django 2.x Cheat Sheet

Creating a virtual environment

We need to create a virtual env for our app to run in: More Here Run this command in whatever folder you want to create your venv folder

python -m venv ./venv
@mbaneshi
mbaneshi / django_deploy.md
Created May 23, 2020 06:33 — forked from bradtraversy/django_deploy.md
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.