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
@mbaneshi
mbaneshi / .gist1.learning-go-lessen01.sh
Created June 4, 2023 13:12
this is my first gist ,created by gh cli , and nvim , zellij and kitty
❯ gh gist create --help
Create a new GitHub gist with given contents.
Gists can be created from one or multiple files. Alternatively, pass "-" as
file name to read from standard input.
By default, gists are secret; use '--public' to make publicly listed ones.
USAGE
@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.