Skip to content

Instantly share code, notes, and snippets.

View MarlonJD's full-sized avatar

Burak Karahan MarlonJD

  • Izmir, Turkey
  • 12:17 (UTC +03:00)
View GitHub Profile
hello there
import os
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project.settings')
import django
django.setup()
from location.models import *
from trainer.models import Trainer
from django.contrib.auth.models import User
from random import randint
"webmagnat.ro","nickelfreesolutions.com","scheepvaarttelefoongids.nl","tursan.net","plannersanonymous.com","doing.fr","saltstack.com","deconsquad.com","migom.com","tjprc.org","worklife.dk","inno-make.com","food-hub.org","bikemastertool.com","betenbewegen.de","vk.me","twotigersports.com","517mrt.com","siel.nl","e-hps.com","infowheel.com","synirc.net","abuliyan.com","easy-ways.com","stark.dk","funwirks.com","eurocqs.net","202yx.com","nikko-sake.com","xnet.lv","visionpharma.com","trade-india.com","t-bird.edu","siebel-crm.net","adriaticapress.it","41789.com","autofirenze.biz","minniowa.com","sweetteaproper.com","recruit-dc.co.jp","competitivecameras.com","zoncinta.com","vadim-prostakov.ru","vk.me","securitasweb.it","mandarinclass.my","pbxi.net","zyznowski.pl","meodia.com","niceinternetmoney.ru","guardiancaps.com","bbccable.net","ams-luenen.de","ihalehaberbulteni.com","salvia-community.net","superpowerfruits.com","bereyellingergl.com","downloadfreetvseries.com","iqshop.ro","urbancliq.com","rocket-media.net","uskud
domains = ["oz4abh.nel","mbohal.cz","easypage.fi","smoro.fr","nickelfreesolutions.com", "radlofff.com","scheepvaarttelefoongids.nl","tursan.net","plannersanonymous.com","doing.fr","saltstack.com","deconsquad.com","migom.com","tjprc.org","worklife.dk","inno-make.com","food-hub.org","bikemastertool.com","betenbewegen.de","vk.me","twotigersports.com","517mrt.com","siel.nl","e-hps.com","infowheel.com","synirc.net","abuliyan.com","easy-ways.com","stark.dk","funwirks.com","eurocqs.net","202yx.com","nikko-sake.com","xnet.lv","visionpharma.com","trade-india.com","t-bird.edu","siebel-crm.net","adriaticapress.it","41789.com","autofirenze.biz","minniowa.com","sweetteaproper.com","recruit-dc.co.jp","competitivecameras.com","zoncinta.com","vadim-prostakov.ru","vk.me","securitasweb.it","mandarinclass.my","pbxi.net","zyznowski.pl","meodia.com","niceinternetmoney.ru","guardiancaps.com","bbccable.net","ams-luenen.de","ihalehaberbulteni.com","salvia-community.net","superpowerfruits.com","bereyellingergl.com","downloadfreetvse
sudo awk '{print "export " $0}' /opt/elasticbeanstalk/deployment/env
sudo su
export $(cat /opt/elasticbeanstalk/deployment/env | xargs)
source /var/app/venv/*/bin/activate && python3 /var/app/current/manage.py migrate
source /var/app/venv/*/bin/activate && python3 /var/app/current/manage.py collectstatic
source /var/app/venv/*/bin/activate && cd /var/app/current/
echo $YOU_ENV_NAME_FORM_EB
@MarlonJD
MarlonJD / gist:baf472f13686087f99911b5595a77c26
Created November 5, 2020 14:46
Backup All Django project
Restore fresh database
When you backup whole database by using dumpdata command, it will backup all the database tables
If you use this database dump to load the fresh database(in another django project), it can be causes IntegrityError (If you loaddata in same database it works fine)
To fix this problem, make sure to backup the database by excluding contenttypes and auth.permissions tables
python manage.py dumpdata --exclude auth.permission --exclude contenttypes > db.json
ffmpeg -hwaccel cuvid -y -i giris.mp4 -c:v hevc_nvenc output2.mp4
tree -I '__pycache__|*test*|venv|*.*~|static|media'
@MarlonJD
MarlonJD / fluttercleanrecursive.sh
Created December 22, 2021 17:11 — forked from jeroen-meijer/fluttercleanrecursive.sh
Flutter Clean Recursive - Clear up space on your hard drive by cleaning your Flutter projects. This script searches for all Flutter projects in this directory and all subdirectories and runs 'flutter clean'. Note: may take a long time for folders with large amounts of projects.
#!/bin/sh
# To run, download the script or copy the code to a '.sh' file (for example 'fluttercleanrecursive.sh') and run like any other script:
# sh ./fluttercleanrecursive.sh
# or
# sudo sh fluttercleanrecursive.sh
echo "Flutter Clean Recursive (by jeroen-meijer on GitHub Gist)"
echo "Looking for projects... (may take a while)"
for dir in .; do
git -C "$dir" ls-files | perl -pe "s[^][$dir/]"
done | zip ./test.zip -@