Skip to content

Instantly share code, notes, and snippets.

View mirhmousavi's full-sized avatar

Mirhossein Mousavi mirhmousavi

View GitHub Profile
@mehmetsefabalik
mehmetsefabalik / nginx-https-local.md
Last active July 10, 2024 08:59
Enable https on your local environment with nginx

enable https on your local environment

install mkcert and create certificates

brew install mkcert
mkcert -install
@bonniss
bonniss / github-search-cheatsheet.md
Last active July 18, 2024 04:53
Github search cheatsheet from official docs.

Github Search Cheat Sheet

GitHub’s search supports a variety of different operations. Here’s a quick cheat sheet for some of the common searches.

For more information, visit our search help section.

Basic search

@RobertAKARobin
RobertAKARobin / python.md
Last active June 13, 2024 04:24
Python Is Not A Great Programming Language
@sergeyklay
sergeyklay / journalctl-cheatsheet.md
Last active June 27, 2024 17:55
Journalctl Cheat Sheet

Journalctl Cheat Sheet

Configuration

Permissions

To see messages from other users and the system as well as performing various log operations from a regular user add it to the group:

sudo usermod -aG systemd-journal $USER
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active July 23, 2024 00:25
set -e, -u, -o, -x pipefail explanation
@raprasad
raprasad / change_password.md
Last active July 4, 2024 17:20
django user; change password from shell

update django password

general changes

To use in dev environments

  • after python manage.py shell
from django.contrib.auth.models import User
@notian
notian / FileReader.php
Last active October 27, 2017 18:10
Directory / File reader using generators
<?php
class FileReader
{
private $filenames;
public function __construct($input)
{
if (is_file($input)) {
$this->filenames = [ $input ];
} elseif (is_dir($input)) {
@rik-degraaff
rik-degraaff / Matrix.java
Last active October 29, 2017 18:10
JMatrix stuff
import integers.*;
public interface Matrix<N extends _N, M extends _N> {
public double getElementAt(int x, int y);
public void setElementAt(int x, int y, double value);
public int numRows();
public int numCols();
public default String asString() {
final String nl = System.getProperty("line.separator");
@nasrulhazim
nasrulhazim / dowload-files-from-ftp-server-using-python3.md
Last active May 6, 2024 09:45
Download Files From FTP Server using Python3
from ftplib import FTP
from datetime import datetime

start = datetime.now()
ftp = FTP('your-ftp-domain-or-ip')
ftp.login('your-username','your-password')

# Get All Files
files = ftp.nlst()
@ziadoz
ziadoz / install.sh
Last active April 20, 2024 10:18
Install Chrome, ChromeDriver and Selenium on Ubuntu 16.04
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# https://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# https://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# https://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# https://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS https://chromedriver.storage.googleapis.com/LATEST_RELEASE`