Skip to content

Instantly share code, notes, and snippets.

@mehmetsefabalik
mehmetsefabalik / nginx-https-local.md
Last active September 2, 2024 23: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 November 12, 2024 03:19
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 November 17, 2024 21:07
Python Is Not A Great Programming Language
@sergeyklay
sergeyklay / journalctl-cheatsheet.md
Last active October 26, 2024 00:11
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 November 19, 2024 17:47
set -e, -u, -o, -x pipefail explanation
@raprasad
raprasad / change_password.md
Last active August 14, 2024 20:22
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 November 7, 2024 19:48
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`