- asdf is cool tool if you have a limited disk space.
- Nor docker containers neither Nixos packages can help when disk space is really small as most of Macs has.
- You can test a new language or tool, see the results and remove without having leftover in your system if you like to.
- install asdf with git
- Btw, you can check the snapd if you are on Ubuntu!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def check_if_signed(): | |
try: | |
yournum = int(input('input a number: ')) | |
if yournum >= 0: | |
print('Your number is unsigned.') | |
elif yournum < 0: | |
print('Your number is signed.') | |
else: | |
print('C\'mon give me numbers.') | |
except: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@ubuntu20-01:/home/bbadmin# tcpdump -i any -N 'port 6065' | |
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode | |
listening on any, link-type LINUX_SLL (Linux cooked v1), capture size 262144 bytes | |
18:37:05.618919 IP localhost.35834 > 192.168.48.4.6065: Flags [S], seq 3926100908, win 65495, options [mss 65495,sackOK,TS val 3651694995 ecr 0,nop,wscale 7], length 0 | |
18:37:05.618942 IP localhost.35834 > 192.168.48.4.6065: Flags [S], seq 3926100908, win 65495, options [mss 65495,sackOK,TS val 3651694995 ecr 0,nop,wscale 7], length 0 | |
18:37:05.618980 IP 192.168.48.4.6065 > localhost.35834: Flags [S.], seq 2052857366, ack 3926100909, win 65160, options [mss 1460,sackOK,TS val 2461048105 ecr 3651694995,nop,wscale 7], length 0 | |
18:37:05.618986 IP 192.168.48.4.6065 > localhost.35834: Flags [S.], seq 2052857366, ack 3926100909, win 65160, options [mss 1460,sackOK,TS val 2461048105 ecr 3651694995,nop,wscale 7], length 0 | |
18:37:05.619043 IP localhost.35834 > 192.168.48.4.6065: Flags [R.], seq 1, ack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name domain.com; | |
location / { | |
proxy_pass http://127.0.0.1:8000; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#asdf direnv install hook | |
eval "$(/Users/kunthar/.asdf/shims/direnv hook bash)" | |
export GREP_OPTIONS='--color=always' | |
# Disable auto update of brew | |
export HOMEBREW_NO_AUTO_UPDATE=1 | |
# cowsay Acme not found fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:fpm-alpine3.14 | |
WORKDIR /var/www/html/ | |
# Date time setup | |
RUN apk add tzdata | |
RUN cp /usr/share/zoneinfo/Europe/Istanbul /etc/localtime | |
RUN echo "Europe/Istanbul" > /etc/timezone | |
RUN apk del tzdata |
- Bullshit venv detection: If you can't find where the hell is this virtualenv you should open workspace settings, create settings.json and add this
"python.pythonPath": "/your_path/.venv/bin/python"
- You click the file and then another one and your previous file closed. You get mad as a hell. Because of preview mode is enabled as default. Disable it as shown here:
https://stackoverflow.com/questions/38713405/open-files-always-in-a-new-tab
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
┌─(py38)[kunthar][kunthar][~/work/repos/Envs] | |
└─▪ pip list | |
Package Version | |
------------------ ---------- | |
appnope 0.1.0 | |
attrs 19.3.0 | |
backcall 0.1.0 | |
bigbluebutton 0.6.0 | |
bleach 3.1.0 | |
certifi 2020.4.5.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
DIRECTORY="/home/lmsadmin/videos" | |
FILES=$DIRECTORY/* | |
if [ -d "$DIRECTORY" ]; then | |
cd $DIRECTORY | |
shopt -s nullglob dotglob # To include hidden files | |
files=($DIRECTORY/*) | |
if [ ${#files[@]} -gt 0 ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#add to .bash_profile //MAC only | |
alias ds_sil='find . -name ".DS_Store" -depth -exec rm {} \;' | |
alias rmds='find . -name '*.DS_Store' -type f -delete' |
NewerOlder