diff
command is usually used to get differences between two files:diff file1.py file2.py
Interesting part of this is that we can even get the differences between to folders, which differ in some files:
diff -bur folder1 folder2
b
flag means ignoring whitespace.u
flag means a unified context (3 lines before and after).r
flag means recursive.#linux #osx #diff
Check if you can connect to
At the end if you can connect to the
response.
#pushd #openssl #apns #push
APNS SERVER
using openssl
:openssl s_client -connect gateway.sandbox.push.apple.com:2195 -cert /etc/pushd/apns-cert.pem -key /etc/pushd/apns-key.pem
At the end if you can connect to the
APNS server
you would see Verify return code: 0 (ok)
. Finally press CTRL+C
to go outside ofresponse.
#pushd #openssl #apns #push
http://www.wispiapp.com/
Wispi is a free cross-platform mobile communications app that allows users to combine voice calls, individual chats as well as group messaging through 3G, 4G or Wi-Fi connection. Our aim is to connect and promote communication between Wispi users FREE where possible and offer users excellent alternatives to the current phone / communication operator.
#wispi #chat #free_call #messaging_app
Wispi is a free cross-platform mobile communications app that allows users to combine voice calls, individual chats as well as group messaging through 3G, 4G or Wi-Fi connection. Our aim is to connect and promote communication between Wispi users FREE where possible and offer users excellent alternatives to the current phone / communication operator.
#wispi #chat #free_call #messaging_app
Some useful string methods, variables:
There are many usecases you can do with this list like generating password, invitation code and etc from a psecific list.
#python #string #ascii_lowercase #ascii_uppercase #digits #punctuation #whitespace
string.ascii_letters
: in case you want to use alpha characters a-zA-Z
. The output is:abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
string.ascii_lowercase
:abcdefghijklmnopqrstuvwxyz
string.ascii_uppercase
:ABCDEFGHIJKLMNOPQRSTUVWXYZ
string.digits
output is numbers:0123456789
string.punctuation
output is special charaters:!"#$%&\'()*+,-./:;<=>?@[\\]^_`{|}~
string.whitespace
includes all whitespace charaters:\t\n\x0b\x0c\r
NOTE:
space is at the end of the above output, which is not visible.There are many usecases you can do with this list like generating password, invitation code and etc from a psecific list.
#python #string #ascii_lowercase #ascii_uppercase #digits #punctuation #whitespace
Tech C**P
Some useful string methods, variables: string.ascii_letters: in case you want to use alpha characters a-zA-Z. The output is: abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ string.ascii_lowercase: abcdefghijklmnopqrstuvwxyz string.ascii_uppercase:…
Generate a sample string (bonus coupon) from
This function returns a random string from
GET THE IDEA!
#python #string #ascii_uppercase #digits #random #random_choice #range
string functions
and removing misguiding characters from the final list:def generate_coupon(coupon_code_length=10):
alphanum = list(string.ascii_uppercase + string.digits)
alphanum.remove('L')
alphanum.remove('I')
alphanum.remove('1')
alphanum.remove('0')
alphanum.remove('O')
return ''.join(random.choice(alphanum) for i in range(coupon_code_length))
This function returns a random string from
ascii_uppercase
and string.digits
. This is one usages out of very many usages of string module public variables. :)GET THE IDEA!
#python #string #ascii_uppercase #digits #random #random_choice #range
In docker you export an image into a tar file and then import that image without ever needing to download it again from docker hub.
To export an image you need to know the image name in your host (you can get image name by listing all images using
—------------------------—
—------------------------—
If you want to import this images in another server or in case all your images have been removed from your host server or local server, you just need to use
—------------------------—
—------------------------—
You need to be in the path that
Now after loading the image you can see that the image is added to your local registry. To check that use
#docker #import #export #save #load #registry #hub #image
To export an image you need to know the image name in your host (you can get image name by listing all images using
docker images
):—------------------------—
docker save python > python.tar
—------------------------—
python
is an image name in docker hub that we have downloaded it once from the hub registry. Now after using save
command you will have a .tar
file in your current path.If you want to import this images in another server or in case all your images have been removed from your host server or local server, you just need to use
load
command to load the image into your local docker registry:—------------------------—
docker load -i python.tar
—------------------------—
You need to be in the path that
python.tar
file exists.Now after loading the image you can see that the image is added to your local registry. To check that use
docker images
#docker #import #export #save #load #registry #hub #image
Forwarded from كانال خبري چمدان
🔸دیجی کالا و بامیلو دیشب که شبیه نمونه های خارجی تخفیف های بزرگ ارایه می دادند، هر دو از دسترس خارج شدند!
@Derangnews
@Derangnews
When you don't have an idea about the load and expecting a
Having a spare server or two, would difinitely help in balancing load in peak. Not having a good deployment strategy to distribute load to newly added healthy nodes would eventually make such a bad user experience.
Digikala! If I were you, I would place automatic scaling (or 1 single click deployment) to prevent such a results. (besides using load balancers that you guys difintely use).
#digikala #bamilo #502 #bad_gateway #scaling #ux
502 BAD Gateway
. It means nothing but lack of scaling capablities or maybe lack of knowledge! After years of experience between Digikala
crews, this is how they handle load of traffic if we not mention Bamilo
!Having a spare server or two, would difinitely help in balancing load in peak. Not having a good deployment strategy to distribute load to newly added healthy nodes would eventually make such a bad user experience.
Digikala! If I were you, I would place automatic scaling (or 1 single click deployment) to prevent such a results. (besides using load balancers that you guys difintely use).
#digikala #bamilo #502 #bad_gateway #scaling #ux
Remove all unused
To remove all unused data:
The command will give a warning and then deletes all unused data from docker.
#docker #prune #system #docker_system #dangling
docker
data including volumes
, images
, network
, etc in one command:docker system prune [OPTIONS]
To remove all unused data:
docker system prune -a
The command will give a warning and then deletes all unused data from docker.
WARNING! This will remove:
- all stopped containers
- all volumes not used by at least one container
- all networks not used by at least one container
- all images without at least one container associated to them
Are you sure you want to continue? [y/N] y
#docker #prune #system #docker_system #dangling
https://github.com/hersonls/djamin/
New and different look for django admin interface
#django #dashboard #admin #theme #template #ui #github #djamin
New and different look for django admin interface
#django #dashboard #admin #theme #template #ui #github #djamin
GitHub
GitHub - hersonls/djamin: A new style for Django admin
A new style for Django admin. Contribute to hersonls/djamin development by creating an account on GitHub.
Naming conventions and recipes related to packaging
Private (including closed-source) projects use a namespace
For internal/customer projects, use your
company name
as the namespace.This rule applies to closed-source projectsi (local PyPi server).
As an example, if you are creating a "climbing" project for the "Python Sport" company: use "pythonsport.climbing" name, even if it is closed source.
NOTE:
The above descriptions are derived from python PEP-423
.#python #package #packaging #pypi #pep423 #conflict
A responsive bootstrap admin for django dashboard:
https://github.com/django-admin-bootstrap/django-admin-bootstrap
#python #django #theme #template #bootstrap #django_admin_bootstrap #github
https://github.com/django-admin-bootstrap/django-admin-bootstrap
#python #django #theme #template #bootstrap #django_admin_bootstrap #github
GitHub
douglasmiranda/django-admin-bootstrap
Responsive Theme for Django Admin With Sidebar Menu - douglasmiranda/django-admin-bootstrap