Skip to content

Instantly share code, notes, and snippets.

View 101t's full-sized avatar
🐍
Simple is better than complex!

Tarek Kalaji 101t

🐍
Simple is better than complex!
View GitHub Profile
@101t
101t / Django QuerySets.md
Last active February 18, 2019 18:17
Django QuerySets

Cheatsheet for Django QuerySets

Current Django Version: 1.11

Methods that return new QuerySets

Can be chained:

Entry.objects.filter(**kwargs).exclude(**kwargs).order_by(**kwargs)
@101t
101t / python-cheatsheet.md
Last active January 24, 2025 09:19
Python Cheatsheet
@101t
101t / linux-cheatsheet.rtf
Last active March 27, 2025 18:20
Comprehensive Linux Cheatsheet
```
____ _ _
/ ___|___ _ __ ___ _ __ _ __ ___| |__ ___ _ __ ___(_)_ _____
| | / _ \| '_ ` _ \| '_ \| '__/ _ \ '_ \ / _ \ '_ \/ __| \ \ / / _ \
| |__| (_) | | | | | | |_) | | | __/ | | | __/ | | \__ \ |\ V / __/
\____\___/|_| |_| |_| .__/|_| \___|_| |_|\___|_| |_|___/_| \_/ \___|
|_|
_ _ ____ _ _ _ _
| | (_)_ __ _ ___ __ / ___| |__ ___ __ _| |_ ___| |__ ___ ___| |_
| | | | '_ \| | | \ \/ / | | | '_ \ / _ \/ _` | __/ __| '_ \ / _ \/ _ \ __|
@101t
101t / github-unfollow-the-following.md
Created May 27, 2019 10:48
Remove the following from your account using JavaScript and your browser console.

This script to unfollow the following on your Github account automatically.

[].slice.call(document.querySelectorAll('.js-toggler-target')).forEach(function(button) {
   var x = button.parentNode.getAttribute("action")
	 if(x.indexOf("/users/unfollow") > -1){console.log(x);button.click();}
});
@101t
101t / manage-react-state-with-redux.js
Created September 25, 2019 07:58
React + Redux state how it works?
import React from 'react';
import { render } from 'react-dom';
import { createStore } from 'redux';
import { connect, Provider } from 'react-redux';
const reducer = (state = {counter: 0}, action) => {
switch (action.type) {
case 'INCREMENT':
return {...state, counter: state.counter+1};
case 'DECREMENT':
@101t
101t / Deployment Guide to Installing Odoo 14 on Ubuntu 20.04.md
Last active August 26, 2024 01:54
Deployment Guide to Installing Odoo 14 on Ubuntu 20.04
@101t
101t / raspberrypi.md
Last active November 23, 2020 14:06
RaspberryPi Quick Tutorial

RaspberryPi small commands

if files seems readonly file:

sudo mount -o remount,rw /root_bypass_ramdisks

set configurations

sudo raspi-config
@101t
101t / PowerShell.md
Last active March 2, 2021 14:09
PowerShell Snipps Commands

PowerShell Snipps Commands

* Rename Multiple file/folder

Rename only under directory

get-childitem prefix_* | foreach { rename-item $_ $_.Name.Replace("prefix", "another_prefix") }

Rename recursivly under directory

@101t
101t / convert-img-to-ascii.md
Last active June 3, 2022 07:25
Convert your image into ASCII Picture

Convert your Image into ASCII art picture:

# Python code to convert an image to ASCII image. 
import sys, random, argparse 
import numpy as np 
import math 

from PIL import Image 
@101t
101t / README.md
Last active April 5, 2023 10:14
Odoo OpenUpgrade Database Migration

Odoo OpenUpgrade Database Migration

Aftar install and configure OpenUpgrade on your local linux:

python3 ./migrate3.py --config=odoo12-server.conf --database=mydb12 --run-migrations=12.0,13.0 --branch-dir=/var/tmp/openupgrade