Skip to content

Instantly share code, notes, and snippets.

View Sanix-Darker's full-sized avatar
🐼
coding in the dark...

darker Sanix-Darker

🐼
coding in the dark...
View GitHub Profile
@Sanix-Darker
Sanix-Darker / [SHELL]anaconda_virtual_env.md
Last active December 27, 2019 11:13
ANACONDA VIRTUAL ENV

Jargon

link to PATH,

Requirements

  • Anaconda Python distribution installed and accessible
@Sanix-Darker
Sanix-Darker / [SHELL]Linux_Boot_USB_key.sh
Last active August 6, 2019 13:04
LINUX COMMAND LINE FOR BOOT USB KEY TRICK
lsblk
sudo dd bs=4M if=/home/darker/Downloads/kali-linux-kde-2019.2-amd64.iso of=/dev/sda1 conv=fdatasync status=progress
@Sanix-Darker
Sanix-Darker / [SHELL]KGB Archiver
Last active September 5, 2019 19:37
[SHELL]KGB Archiver
# Compression with level 9:
kgb -9 archive1.kgb ZX_Spectrum.html
# Decompression:
kgb archive.kgb
@Sanix-Darker
Sanix-Darker / [HTML, CSS]Simulate_textType_as_passwordType_HTML.html
Last active September 5, 2019 19:39
[HTML, CSS]Simulate Type text as a Type password HTML
<style>
/** This style is to simulate an input type="password" on a real input type="text"*/
@font-face {
font-family: 'password';
font-style: normal;
font-weight: 400;
src: url(https://jsbin-user-assets.s3.amazonaws.com/rafaelcastrocouto/password.ttf);
}
.bePassword {
font-family: 'password';
@Sanix-Darker
Sanix-Darker / README.md
Last active March 24, 2020 10:42
[PYTHON]SIMPLE PYTHON FLASK STARTER

SIMPLE AND BASIC REST PYTHON FLASK STARTER

How to install

pip install -r requirements.txt

How to launch

@Sanix-Darker
Sanix-Darker / [SHELL]Find_process_by_Name_and_kill_it.sh
Last active September 5, 2019 19:41
[SHELL]Find process by Name and kill it
ps -ef | grep python
kill -9 PID
pkill -9 python
pkill -9 -f path/to/my_script.py
@Sanix-Darker
Sanix-Darker / [GIT]Move_your_commits_from_a_branch_to_another_branch.sh
Last active September 5, 2019 19:41
[GIT]Move your commits from a branch to another branch
git checkout mabranch
git merge master
git checkout master
git reset --hard HEAD~3 # Go back 3 commits. You *will* lose uncommitted work.
# Or you can just specify the hash ID of the commit you want to reset like this : "git reset --hard ad23e27"
git checkout mabranch
@Sanix-Darker
Sanix-Darker / [SHELL]install_utorrentWEB_ubuntu.sh
Last active September 5, 2019 19:43
[SHELL]Utorrent WEB Ubuntu
sudo apt update
sudo apt upgrade
sudo apt-get install libssl1.0.0 libssl-dev
wget http://download-new.utorrent.com/endpoint/utserver/os/linux-x64-ubuntu-13-04/track/beta/ -O utorrent.tar.gz
sudo tar -zxvf utorrent.tar.gz -C /opt/
sudo chmod 777 /opt/utorrent-server-alpha-v3_3/
ln -s /opt/utorrent-server-alpha-v3_3/utserver /usr/bin/utserver
@Sanix-Darker
Sanix-Darker / [SHELL, DOCKER]Mon_docker.sh
Last active September 5, 2019 19:43
[SHELL, DOCKER]Mon docker commands
docker ps — Lists running containers. Some useful flags include: -a / -all for all containers (default shows just running) and —-quiet /-q to list just their ids (useful for when you want to get all the containers).
docker pull — Most of your images will be created on top of a base image from the Docker Hub registry. Docker Hub contains many pre-built images that you can pull and try without needing to define and configure your own. To download a particular image, or set of images (i.e., a repository), use docker pull.
docker build — The docker build command builds Docker images from a Dockerfile and a “context”. A build’s context is the set of files located in the specified PATH or URL. Use the -t flag to label the image, for example docker build -t my_container . with the . at the end signalling to build using the currently directory.
docker run — Run a docker container based on an image, you can follow this on with other commands, such as -it bash to then run bash from within the container. Also see Top 10
@Sanix-Darker
Sanix-Darker / [PYTHON]import a module on sup folder PYTHON withouth been a package (containing a __init__.py file).py
Last active October 11, 2019 12:33
[PYTHON]import a module on sup folder PYTHON withouth been a package (containing a __init__.py file)
from os import path as ospath
from sys import path as syspath
# moving the path outside of the current dir
syspath.insert(1, ospath.join(syspath[0], '..'))
import module
# Or just in a specific parent directory in the sup folder:
# import sys
# sys.path.insert(0, '../module/')