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
@bartholomej
bartholomej / css-media-queries-cheat-sheet.css
Last active June 14, 2024 08:20
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) { }
@jjnilton
jjnilton / mac-network-commands-cheat-sheet.md
Last active June 22, 2024 13:03
Mac Network Commands Cheat Sheet

Disclaimer: I'm not the original author of this sheet, but can't recall where I found it. If you know the author, please let me know so I give the attribution.

The original author seems to be Charles Edge, here's the original content, as pointed out by @percisely.

Note: Since this seems to be helpful to some people, I formatted it to improve readability of the original. Also, note that this is from 2016, many things may have changed, and I don't use macOS anymore, so I probably can't help in case of questions, but maybe someone else can.

Mac Network Commands Cheat Sheet

After writing up the presentation for MacSysAdmin in Sweden, I decided to go ahead and throw these into a quick cheat sheet for anyone who’d like to have them all in one place. Good luck out there, and s

@iammert
iammert / NewIntentProcessor.java
Created May 9, 2017 08:24
NewIntentProcessor
public class NewIntentProcessor extends AbstractProcessor {
private static final String METHOD_PREFIX = "start";
private static final ClassName classIntent = ClassName.get("android.content", "Intent");
private static final ClassName classContext = ClassName.get("android.content", "Context");
private Filer filer;
private Messager messager;
private Elements elements;
private Map<String, String> activitiesWithPackage;
@fearblackcat
fearblackcat / proxy_for_terminal.md
Last active June 27, 2024 08:17
Set proxy for terminal on mac

Shadowsocks Proxy

apt-get install python-pip
pip install shadowsocks

sudo ssserver -p 443 -k password -m aes-256-cfb --user nobody -d start
@bradtraversy
bradtraversy / django_cheat_sheet.md
Last active July 2, 2024 19:38
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
@bradtraversy
bradtraversy / django_deploy.md
Last active July 2, 2024 19:39
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.

@joelpalmer
joelpalmer / life-changing-aliases.zsh
Last active August 30, 2022 20:20
Life changing Zsh aliases
# Custom Aliases
alias -s txt=nvim
alias -s vim=nvim
alias -s zsh=nvim
alias -s zshrc=nvim
alias -s {c,h}=nvim
alias -s {js,json}=nvim
alias -s {md,MD}=nvim
alias -s {rs,toml}=nvim
alias -s {yml}=nvim
@andrewhummus
andrewhummus / init.vim
Last active September 4, 2022 16:03
config for nvim
" <essentials>
set nocompatible " don't try to be compatible with V
filetype plugin on
lua require('plugins')
set relativenumber
set termguicolors
set expandtab
set hidden
set tabstop=2
set softtabstop=2
@WietseWind
WietseWind / sample.js
Created January 12, 2022 13:57
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 })