Skip to content

Instantly share code, notes, and snippets.

View byeblogs's full-sized avatar

Iam ByeBlog`s byeblogs

View GitHub Profile
@byeblogs
byeblogs / ~ Regex Password ~
Last active November 4, 2021 19:13
Regex Password
Minimum 8 characters at least 1 Alphabet and 1 Number:
"^(?=.*[A-Za-z])(?=.*\d)[A-Za-z\d]{8,}$"
Minimum 8 characters at least 1 Alphabet, 1 Number and 1 Special Character:
"^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{8,}$"
Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet and 1 Number:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{8,}$"
Minimum 8 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:
"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[$@$!%*?&])[A-Za-z\d$@$!%*?&]{8,}"
Minimum 8 and Maximum 10 characters at least 1 Uppercase Alphabet, 1 Lowercase Alphabet, 1 Number and 1 Special Character:
@byeblogs
byeblogs / Http Error Codes !
Last active May 25, 2021 11:44
Http Error Codes
HTTP Error Codes - 401 Access Denied , 403 Forbidden , 404 Not Found , 500 Internal Server Error
HTTP Error Code and their definition
100 - Continue.
101 - Switching protocols.
200 - OK. The client request has succeeded.
201 - Created.
202 - Accepted.
203 - Non-authoritative information.
204 - No content.
205 - Reset content.
@byeblogs
byeblogs / disqus_comment.js
Last active May 25, 2021 11:44
Disqus Comment
var disqus_shortname="bye_webster";
var disqus_url = "httP://bye-webster.blogspot.co.id";
(function () {
"use strict";
var get_comment_block = function () {
var block = document.getElementById('comments');
if (!block) {
block = document.getElementById('disqus-blogger-comment-block');
}
@byeblogs
byeblogs / Check Validasi Email !
Last active May 25, 2021 11:40
Check Validasi Email
<?php header("Content-Type: text/plain");
function cekValidEmail($email) {
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
list($user, $host) = explode('@', $email);
if (!checkdnsrr($host, 'MX')) {
return false;
} else {
return true;
}
} else {
@byeblogs
byeblogs / Blur Image Before Loaded !
Last active May 25, 2021 11:40
Blur Image Before Loaded
HTML
<div class="placeholder" data-large="https://cdn-images-1.medium.com/max/1800/1*sg-uLNm73whmdOgKlrQdZA.jpeg">
<img src="https://cdn-images-1.medium.com/freeze/max/27/1*sg-uLNm73whmdOgKlrQdZA.jpeg?q=20" class="img-small">
<div style="padding-bottom: 66.6%;"></div>
</div>
CSS
.placeholder {
@byeblogs
byeblogs / gist:2edab0449970ce0ceca62bc65c6ef498
Created October 21, 2017 09:15
Problem With Upgrade PHP VERSION & CHANGE PATH !
To change the php path in mac Sierra, i did the steps mentioned but still when i run
which php
I still get
/usr/local/bin/php
I tried restarting terminal and even mac but it is still the same path. I have followed every steps
change bash_profile
export PATH="/Applications/XAMPP/xamppfiles/bin/php-7.0.15:$PATH"
@byeblogs
byeblogs / sketch-never-ending.md
Created December 12, 2017 08:08 — forked from Bhavdip/sketch-never-ending.md
Modify Sketch to never ending trial

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts

Edit the file adding:

127.0.0.1 backend.bohemiancoding.com

127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com

@byeblogs
byeblogs / never-ending-sketchapp.md
Created December 12, 2017 08:10
Follow this instruction to get unlimited trial for sketchapps for mac..

###Sketch trial non stop

Open hosts files:

$ open /private/etc/hosts Edit the file adding:

127.0.0.1 backend.bohemiancoding.com 127.0.0.1 bohemiancoding.sketch.analytics.s3-website-us-east-1.amazonaws.com Open .licence file

@byeblogs
byeblogs / DummyDataJsonArray.json
Last active January 30, 2018 03:56
Just Example For DummyDataJsonArray.json
[
{
"_id": "5a6fecedcebc07ddfd7fb39b",
"index": 0,
"guid": "719810c7-12fe-4cdd-b666-03878f61e9d0",
"isActive": false,
"balance": "$3,444.55",
"picture": "http://placehold.it/32x32",
"age": 21,
"eyeColor": "green",
@byeblogs
byeblogs / response.login.json
Last active March 13, 2018 07:14
Example Response Login !
{
"employee_id": "1000",
"full_name": "Abdul Rhazak",
"nick_name": "Rhazak",
"email": "[email protected]",
"token_web": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9==",
"status_code":"200",
"msg":"Login success!"
}