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 / 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 / linux-cheatsheet.rtf
Last active March 27, 2025 18:20
Comprehensive Linux Cheatsheet
```
____ _ _
/ ___|___ _ __ ___ _ __ _ __ ___| |__ ___ _ __ ___(_)_ _____
| | / _ \| '_ ` _ \| '_ \| '__/ _ \ '_ \ / _ \ '_ \/ __| \ \ / / _ \
| |__| (_) | | | | | | |_) | | | __/ | | | __/ | | \__ \ |\ V / __/
\____\___/|_| |_| |_| .__/|_| \___|_| |_|\___|_| |_|___/_| \_/ \___|
|_|
_ _ ____ _ _ _ _
| | (_)_ __ _ ___ __ / ___| |__ ___ __ _| |_ ___| |__ ___ ___| |_
| | | | '_ \| | | \ \/ / | | | '_ \ / _ \/ _` | __/ __| '_ \ / _ \/ _ \ __|
@101t
101t / python-cheatsheet.md
Last active January 24, 2025 09:19
Python Cheatsheet
@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 / Git-Commands.md
Last active August 4, 2023 06:09
Git Commands Hot and simple tutorials

Git repositories with Submodules

clone new repository with submodules

git clone --recurse-submodules -j8 git://github.com/foo/bar.git

Source: here

Update sub-repositories in main repository tree

git submodule update --remote --merge
@101t
101t / Laravel 5 tutorial.md
Last active May 31, 2020 10:06
Laravel 5 simple Tutorial

PHP / WordPress / Laravel

PHP

Correcting file permissions on server

chown www-data:www-data -R * # Let Apache be owner
find . -type d -exec chmod 755 {} \;  # Change directory permissions rwxr-xr-x
find . -type f -exec chmod 644 {} \;  # Change file permissions rw-r--r--

According to: StackOverflow Answer

@101t
101t / nodejs-notes.md
Last active February 18, 2019 18:17
NodeJS Installation Quick Start

NodeJS

Node installation and required dependencies

NodeJS, to install NodeJS packages in this example we will use Ubuntu 14.04 TLS as OS example and expressjs as node package example, Ubuntu 16.04 TLS contains a version of Node.js in its default repositories.

apt-get update && apt-get upgrade
apt-get install nodejs

to check nodejs version

node -v
@101t
101t / process-rxfax.py
Created December 7, 2016 15:10
the script uses the UUID from freeswitch to make a unique filename on the server while receiving, then renames the attachment to a friendly name for the emailed user. The script calls tiff2ps and ps2pdf to create a PDF from the initial TIFF from spandsp.
#!/usr/local/bin/python
#
# process-rxfax.py - post process incoming fax from freeswitch (spandsp raw .tiff => pdf, then
# emailed)
#
# the script uses the UUID from freeswitch to make a unique filename on the server while receiving,
# then renames the attachment to a friendly name for the emailed user. The script calls tiff2ps
# and ps2pdf to create a PDF from the initial TIFF from spandsp.
#
import sys # import the sys module for argv
#/bin/bash
# Update the ldconfig configuration file.
touch /etc/ld.so.conf.d/x86_64-linux-freeswitch.conf
echo "/usr/local/lib" >> /etc/ld.so.conf.d/x86_64-linux-freeswitch.conf
# Install libyuv-dev
cd /usr/src
wget http://files.freeswitch.org/downloads/libs/libyuv-0.0.1280.tar.gz
tar -xzvf libyuv-0.0.1280.tar.gz
cd libyuv-0.0.1280
@101t
101t / ping.py
Created November 14, 2015 08:54 — forked from pklaus/ping.py
A pure python ping implementation using raw socket.
#!/usr/bin/env python2
"""
Other Repositories of python-ping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* https://github.com/l4m3rx/python-ping supports Python2 and Python3
* https://bitbucket.org/delroth/python-ping