echo cycode | make cycode.c
echo cycode | make
Now cycode is the Executable.
import pafy # pip install pafy youtube-dl | |
def download(video_ids, video=True, audio=False): | |
"""To download the videos from playlist | |
Args:- | |
video_ids : list(str) = List of video ids has to be downloaded | |
video : bool = Enable to download video | |
audio : bool = Enable to download audio | |
""" | |
for i, video_id in enumerate(video_ids): |
if [ -z "$1" ] | |
then | |
wget https://github.com/nkpro2000/For-nkpro2000sr/raw/master/repos/serveo-linux-amd64 | |
serveo=serveo-linux-amd64 | |
else | |
serveo="$1" | |
fi | |
sudo ./${serveo} -port 2222 -private_key_path /etc/ssh/ssh_host_rsa_key |
# remap prefix from 'C-b' to 'C-a' and 'C-/' | |
unbind 'C-b' | |
set-option -g prefix 'C-a' | |
bind-key 'C-a' send-prefix | |
# split panes using | and \ | |
unbind '"' | |
unbind '%' | |
bind '|' split-window -h | |
bind '\' split-window -v |
class TeleCaller: | |
"""It is usefull for calling the called function in another interperter. | |
Args: | |
prefix (list): prefix to the call_string | |
modules (list): modules needed to import, added like "import module1, module2, ... ;" | |
before call_string. | |
encoder : passes through before calling | |
decoder : passed through before returning | |
Example: |
# To install Chocolatey (cli pkgmgr) | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) |
git clone https://github.com/Homebrew/brew ~/.linuxbrew/Homebrew | |
mkdir ~/.linuxbrew/bin | |
ln -s ~/.linuxbrew/Homebrew/bin/brew ~/.linuxbrew/bin | |
eval $(~/.linuxbrew/bin/brew shellenv) | |
echo 'you can manually setup brew envs using this command (For each terminal session)' | |
echo 'eval $(~/.linuxbrew/bin/brew shellenv)' | |
echo '#brew{' >> .bashrc | |
echo 'eval $(~/.linuxbrew/bin/brew shellenv)' >> .bashrc | |
# to uninstall brew | |
echo 'brew-uninstall () {' >> ~/.bashrc |
curl -s "http://worldtimeapi.org/api/timezone/Asia/Kolkata" | cut -d'"' -f34 # alternative to `date` | |
curl -s ifconfig.co/json | jq # to find your public IP | |
perl -nle 'print $& while m/[[:print:]]{4,}/g' binary_input # perl version of strings command | |
curl -L bit.ly/setup-pyenv | sh # to setup pyenv as py | |
curl -L bit.ly/setup-brew | sh # to setup brew | |
alias pi='ping 8.8.8.8 | less +F' # ^c + q to exit | |
alias br='sudo nano /sys/class/backlight/*/brightness' # to change brightness | |
alias dt='date +"%d[%a]/%m[%b]/%Y %H[%I%p]:%M:%S"' # just Date and Time | |
alias lslck='sudo ls /var/lib/*/*.lck' # to list all locks |
import requests # only these [urls](www.pythonanywhere.com/whitelist/) are allowed | |
def get_content(path): | |
" Do whatever with `path` and generate `content` " | |
return content | |
def application(environ, start_response): | |
path = environ.get('PATH_INFO') | |
content = get_content(path) | |
if content == None : | |
status = '404 NOT FOUND' |
# pyenv | |
git clone https://github.com/pyenv/pyenv.git ~/.pyenv | |
# pyenv-virtualenv | |
git clone https://github.com/pyenv/pyenv-virtualenv.git ~/.pyenv/plugins/pyenv-virtualenv | |
# pyenv-pip-migrate | |
git clone git://github.com/pyenv/pyenv-pip-migrate.git ~/.pyenv/plugins/pyenv-pip-migrate | |
# pyenv-update | |
git clone https://github.com/pyenv/pyenv-update.git ~/.pyenv/plugins/pyenv-update | |
# adding pyenv to environment | |
echo '#pyenv{' >> ~/.bashrc |