Skip to content

Instantly share code, notes, and snippets.

@bayu-code-lab
bayu-code-lab / all_email_provider_domains.txt
Created July 18, 2022 05:12 — forked from ammarshah/all_email_provider_domains.txt
A list of all email provider domains (free, paid, blacklist etc). Some of these are probably not around anymore. I've combined a dozen lists from around the web. Current "major providers" should all be in here as of the date this is created.
0-mail.com
007addict.com
020.co.uk
027168.com
0815.ru
0815.su
0clickemail.com
0sg.net
0wnd.net
0wnd.org
#Regular Function
def full_name(first_name, last_name):
result = '{} {}'.format(first_name, last_name)
return result
#Lambda Function
lambda first_name, last_name: '{} {}'.format(first_name, last_name)
@bayu-code-lab
bayu-code-lab / python guide.md
Created October 4, 2021 18:44 — forked from asaah18/python guide.md
a python guide/cheat-sheet for mind refreshing and looking for specific info

Python Guide

This python guide is intended to those who already know python and want a mind refresh or looking for a specific syntax
-as this guide doesn't elaborate in explaining thing that a programmer would already know -like: variable, function, csv, json-.

additionally, this guide is not intended to be a replacement for reading official Python documentation.

@bayu-code-lab
bayu-code-lab / browser_detect.js
Created July 26, 2021 14:08 — forked from Fl0pZz/browser_detect.js
JavaScript: Detect Browser
// browser detect
var BrowserDetect = {
init: function(userAgent, appVersion) {
this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
this.version = this.searchVersion(userAgent) || this.searchVersion(appVersion) || "an unknown version";
this.OS = this.searchString(this.dataOS) || "an unknown OS";
},
searchString: function(data) {
for (var i = 0; i < data.length; i++) {
var dataString = data[i].string;
@bayu-code-lab
bayu-code-lab / beanstalk_deploy.py
Created January 11, 2020 12:47
CI/CD Django Bitbucket to AWS Elastic Beanstalk
"""
A Bitbucket Builds template for deploying
an application to AWS Elastic Beanstalk
joshcb@amazon.com
v1.0.0
"""
from __future__ import print_function
import os
import sys
from time import strftime, sleep
@bayu-code-lab
bayu-code-lab / add-data-attributes-to-choicefield-select-option.py
Created January 11, 2020 12:42
django add data attributes to choicefield select option
#region widgets.py
from django import forms
class CustomSelect(forms.widgets.Select):
def __init__(self, attrs=None, choices=(), modify_choices=()):
super(CustomSelect, self).__init__(attrs, choices=choices)
# set data
self.modify_choices = modify_choices
def create_option(self, name, value, label, selected, index, subindex=None, attrs=None):